From 6d9c07007d15577ed905f532609f9359ac0d87f3 Mon Sep 17 00:00:00 2001 From: Stefan Herold Date: Wed, 9 Sep 2020 15:46:51 +0200 Subject: [PATCH 1/3] Add AppStoreConnect spec --- .../generated/Swift/AppStoreConnect.podspec | 14 + .../AppStoreConnect/generated/Swift/Cartfile | 2 + .../generated/Swift/Info.plist | 24 + .../generated/Swift/Package.swift | 18 + .../AppStoreConnect/generated/Swift/README.md | 697 + .../generated/Swift/Sources/API.swift | 76 + .../generated/Swift/Sources/APIClient.swift | 252 + .../Swift/Sources/APIClientError.swift | 40 + .../generated/Swift/Sources/APIRequest.swift | 89 + .../generated/Swift/Sources/APIResponse.swift | 101 + .../generated/Swift/Sources/APIResult.swift | 6 + .../generated/Swift/Sources/APIService.swift | 47 + .../generated/Swift/Sources/AnyCodable.swift | 188 + .../generated/Swift/Sources/Coding.swift | 367 + .../Sources/Models/AgeRatingDeclaration.swift | 234 + .../Models/AgeRatingDeclarationResponse.swift | 43 + .../AgeRatingDeclarationUpdateRequest.swift | 259 + .../generated/Swift/Sources/Models/App.swift | 1916 + .../AppBetaTestersLinkagesRequest.swift | 78 + .../Models/AppCategoriesResponse.swift | 55 + .../Swift/Sources/Models/AppCategory.swift | 369 + .../Sources/Models/AppCategoryResponse.swift | 49 + .../Models/AppEncryptionDeclaration.swift | 308 + ...tionDeclarationBuildsLinkagesRequest.swift | 78 + .../AppEncryptionDeclarationResponse.swift | 49 + .../AppEncryptionDeclarationState.swift | 14 + .../AppEncryptionDeclarationsResponse.swift | 55 + .../Swift/Sources/Models/AppInfo.swift | 1113 + .../Sources/Models/AppInfoLocalization.swift | 266 + .../AppInfoLocalizationCreateRequest.swift | 242 + .../Models/AppInfoLocalizationResponse.swift | 43 + .../AppInfoLocalizationUpdateRequest.swift | 133 + .../Models/AppInfoLocalizationsResponse.swift | 49 + .../Sources/Models/AppInfoResponse.swift | 49 + .../Sources/Models/AppInfoUpdateRequest.swift | 577 + .../Sources/Models/AppInfosResponse.swift | 55 + .../Sources/Models/AppMediaAssetState.swift | 56 + .../Sources/Models/AppMediaStateError.swift | 43 + .../Swift/Sources/Models/AppPreOrder.swift | 248 + .../Models/AppPreOrderCreateRequest.swift | 218 + .../Sources/Models/AppPreOrderResponse.swift | 43 + .../Models/AppPreOrderUpdateRequest.swift | 115 + .../Swift/Sources/Models/AppPreview.swift | 290 + .../Models/AppPreviewCreateRequest.swift | 236 + .../Sources/Models/AppPreviewResponse.swift | 43 + .../Swift/Sources/Models/AppPreviewSet.swift | 369 + ...PreviewSetAppPreviewsLinkagesRequest.swift | 78 + ...reviewSetAppPreviewsLinkagesResponse.swift | 90 + .../Models/AppPreviewSetCreateRequest.swift | 218 + .../Models/AppPreviewSetResponse.swift | 49 + .../Models/AppPreviewSetsResponse.swift | 55 + .../Models/AppPreviewUpdateRequest.swift | 127 + .../Sources/Models/AppPreviewsResponse.swift | 49 + .../Swift/Sources/Models/AppPrice.swift | 326 + .../Swift/Sources/Models/AppPricePoint.swift | 369 + .../Models/AppPricePointResponse.swift | 49 + .../Models/AppPricePointsResponse.swift | 55 + .../Sources/Models/AppPriceResponse.swift | 43 + .../Swift/Sources/Models/AppPriceTier.swift | 211 + .../Sources/Models/AppPriceTierResponse.swift | 49 + .../Models/AppPriceTiersResponse.swift | 55 + .../Sources/Models/AppPricesResponse.swift | 49 + .../Swift/Sources/Models/AppResponse.swift | 49 + .../Swift/Sources/Models/AppScreenshot.swift | 284 + .../Models/AppScreenshotCreateRequest.swift | 224 + .../Models/AppScreenshotResponse.swift | 43 + .../Sources/Models/AppScreenshotSet.swift | 369 + ...shotSetAppScreenshotsLinkagesRequest.swift | 78 + ...hotSetAppScreenshotsLinkagesResponse.swift | 90 + .../AppScreenshotSetCreateRequest.swift | 218 + .../Models/AppScreenshotSetResponse.swift | 49 + .../Models/AppScreenshotSetsResponse.swift | 55 + .../Models/AppScreenshotUpdateRequest.swift | 121 + .../Models/AppScreenshotsResponse.swift | 49 + .../Sources/Models/AppStoreAgeRating.swift | 13 + .../Models/AppStoreReviewAttachment.swift | 266 + ...ppStoreReviewAttachmentCreateRequest.swift | 224 + .../AppStoreReviewAttachmentResponse.swift | 43 + ...ppStoreReviewAttachmentUpdateRequest.swift | 121 + .../AppStoreReviewAttachmentsResponse.swift | 49 + .../Sources/Models/AppStoreReviewDetail.swift | 411 + .../AppStoreReviewDetailCreateRequest.swift | 260 + .../Models/AppStoreReviewDetailResponse.swift | 49 + .../AppStoreReviewDetailUpdateRequest.swift | 157 + .../Sources/Models/AppStoreVersion.swift | 1270 + .../AppStoreVersionBuildLinkageRequest.swift | 78 + .../AppStoreVersionBuildLinkageResponse.swift | 84 + .../Models/AppStoreVersionCreateRequest.swift | 332 + .../Models/AppStoreVersionLocalization.swift | 532 + ...toreVersionLocalizationCreateRequest.swift | 254 + .../AppStoreVersionLocalizationResponse.swift | 49 + ...toreVersionLocalizationUpdateRequest.swift | 145 + ...AppStoreVersionLocalizationsResponse.swift | 55 + .../Models/AppStoreVersionPhasedRelease.swift | 108 + ...oreVersionPhasedReleaseCreateRequest.swift | 218 + ...AppStoreVersionPhasedReleaseResponse.swift | 43 + ...oreVersionPhasedReleaseUpdateRequest.swift | 115 + .../Models/AppStoreVersionResponse.swift | 49 + .../Sources/Models/AppStoreVersionState.swift | 26 + .../Models/AppStoreVersionSubmission.swift | 205 + ...pStoreVersionSubmissionCreateRequest.swift | 181 + .../AppStoreVersionSubmissionResponse.swift | 43 + .../Models/AppStoreVersionUpdateRequest.swift | 260 + .../Models/AppStoreVersionsResponse.swift | 55 + .../Sources/Models/AppUpdateRequest.swift | 325 + .../Swift/Sources/Models/AppsResponse.swift | 55 + .../Sources/Models/BetaAppLocalization.swift | 272 + .../BetaAppLocalizationCreateRequest.swift | 248 + .../Models/BetaAppLocalizationResponse.swift | 49 + .../BetaAppLocalizationUpdateRequest.swift | 139 + .../Models/BetaAppLocalizationsResponse.swift | 55 + .../Sources/Models/BetaAppReviewDetail.swift | 284 + .../Models/BetaAppReviewDetailResponse.swift | 49 + .../BetaAppReviewDetailUpdateRequest.swift | 157 + .../Models/BetaAppReviewDetailsResponse.swift | 55 + .../Models/BetaAppReviewSubmission.swift | 242 + ...BetaAppReviewSubmissionCreateRequest.swift | 181 + .../BetaAppReviewSubmissionResponse.swift | 49 + .../BetaAppReviewSubmissionsResponse.swift | 55 + .../Models/BetaBuildLocalization.swift | 248 + .../BetaBuildLocalizationCreateRequest.swift | 224 + .../BetaBuildLocalizationResponse.swift | 49 + .../BetaBuildLocalizationUpdateRequest.swift | 115 + .../BetaBuildLocalizationsResponse.swift | 55 + .../Swift/Sources/Models/BetaGroup.swift | 544 + .../BetaGroupBetaTestersLinkagesRequest.swift | 78 + ...BetaGroupBetaTestersLinkagesResponse.swift | 90 + .../BetaGroupBuildsLinkagesRequest.swift | 78 + .../BetaGroupBuildsLinkagesResponse.swift | 90 + .../Models/BetaGroupCreateRequest.swift | 398 + .../Sources/Models/BetaGroupResponse.swift | 49 + .../Models/BetaGroupUpdateRequest.swift | 139 + .../Sources/Models/BetaGroupsResponse.swift | 55 + .../Swift/Sources/Models/BetaInviteType.swift | 11 + .../Sources/Models/BetaLicenseAgreement.swift | 242 + .../Models/BetaLicenseAgreementResponse.swift | 49 + .../BetaLicenseAgreementUpdateRequest.swift | 115 + .../BetaLicenseAgreementsResponse.swift | 55 + .../Sources/Models/BetaReviewState.swift | 13 + .../Swift/Sources/Models/BetaTester.swift | 520 + .../BetaTesterAppsLinkagesRequest.swift | 78 + .../BetaTesterAppsLinkagesResponse.swift | 90 + .../BetaTesterBetaGroupsLinkagesRequest.swift | 78 + ...BetaTesterBetaGroupsLinkagesResponse.swift | 90 + .../BetaTesterBuildsLinkagesRequest.swift | 78 + .../BetaTesterBuildsLinkagesResponse.swift | 90 + .../Models/BetaTesterCreateRequest.swift | 308 + .../Sources/Models/BetaTesterInvitation.swift | 53 + .../BetaTesterInvitationCreateRequest.swift | 259 + .../Models/BetaTesterInvitationResponse.swift | 43 + .../Sources/Models/BetaTesterResponse.swift | 49 + .../Sources/Models/BetaTestersResponse.swift | 55 + .../Sources/Models/BrazilAgeRating.swift | 15 + .../Swift/Sources/Models/Build.swift | 1277 + ...pEncryptionDeclarationLinkageRequest.swift | 78 + ...EncryptionDeclarationLinkageResponse.swift | 84 + .../Sources/Models/BuildBetaDetail.swift | 254 + .../Models/BuildBetaDetailResponse.swift | 49 + .../Models/BuildBetaDetailUpdateRequest.swift | 115 + .../Models/BuildBetaDetailsResponse.swift | 55 + .../BuildBetaGroupsLinkagesRequest.swift | 78 + .../Models/BuildBetaNotification.swift | 53 + .../BuildBetaNotificationCreateRequest.swift | 181 + .../BuildBetaNotificationResponse.swift | 43 + .../Swift/Sources/Models/BuildIcon.swift | 96 + .../Sources/Models/BuildIconsResponse.swift | 49 + ...uildIndividualTestersLinkagesRequest.swift | 78 + ...ildIndividualTestersLinkagesResponse.swift | 90 + .../Swift/Sources/Models/BuildResponse.swift | 49 + .../Sources/Models/BuildUpdateRequest.swift | 230 + .../Swift/Sources/Models/BuildsResponse.swift | 55 + .../Swift/Sources/Models/BundleId.swift | 514 + .../Models/BundleIdCapabilitiesResponse.swift | 49 + .../Sources/Models/BundleIdCapability.swift | 96 + .../BundleIdCapabilityCreateRequest.swift | 224 + .../Models/BundleIdCapabilityResponse.swift | 43 + .../BundleIdCapabilityUpdateRequest.swift | 121 + .../Models/BundleIdCreateRequest.swift | 127 + .../Sources/Models/BundleIdPlatform.swift | 11 + .../Sources/Models/BundleIdResponse.swift | 49 + .../Models/BundleIdUpdateRequest.swift | 115 + .../Sources/Models/BundleIdsResponse.swift | 55 + .../Sources/Models/CapabilityOption.swift | 76 + .../Sources/Models/CapabilitySetting.swift | 91 + .../Swift/Sources/Models/CapabilityType.swift | 37 + .../Swift/Sources/Models/Certificate.swift | 126 + .../Models/CertificateCreateRequest.swift | 115 + .../Sources/Models/CertificateResponse.swift | 43 + .../Sources/Models/CertificateType.swift | 18 + .../Sources/Models/CertificatesResponse.swift | 49 + .../Swift/Sources/Models/Device.swift | 140 + .../Sources/Models/DeviceCreateRequest.swift | 121 + .../Swift/Sources/Models/DeviceResponse.swift | 43 + .../Sources/Models/DeviceUpdateRequest.swift | 126 + .../Sources/Models/DevicesResponse.swift | 49 + .../Swift/Sources/Models/DiagnosticLog.swift | 53 + .../Models/DiagnosticLogsResponse.swift | 49 + .../Sources/Models/DiagnosticSignature.swift | 106 + .../Models/DiagnosticSignaturesResponse.swift | 55 + .../Swift/Sources/Models/DocumentLinks.swift | 37 + .../Models/EndUserLicenseAgreement.swift | 369 + ...EndUserLicenseAgreementCreateRequest.swift | 296 + .../EndUserLicenseAgreementResponse.swift | 49 + ...EndUserLicenseAgreementUpdateRequest.swift | 224 + .../Swift/Sources/Models/ErrorResponse.swift | 98 + .../Sources/Models/ExternalBetaState.swift | 21 + .../Models/GameCenterEnabledVersion.swift | 381 + ...ionCompatibleVersionsLinkagesRequest.swift | 78 + ...onCompatibleVersionsLinkagesResponse.swift | 90 + .../GameCenterEnabledVersionsResponse.swift | 55 + .../Swift/Sources/Models/IconAssetType.swift | 14 + .../Sources/Models/IdfaDeclaration.swift | 260 + .../Models/IdfaDeclarationCreateRequest.swift | 236 + .../Models/IdfaDeclarationResponse.swift | 43 + .../Models/IdfaDeclarationUpdateRequest.swift | 133 + .../Swift/Sources/Models/ImageAsset.swift | 49 + .../Swift/Sources/Models/InAppPurchase.swift | 296 + .../Models/InAppPurchaseResponse.swift | 43 + .../Models/InAppPurchasesResponse.swift | 49 + .../Sources/Models/InternalBetaState.swift | 16 + .../Swift/Sources/Models/KidsAgeBand.swift | 12 + .../Sources/Models/PagedDocumentLinks.swift | 49 + .../Sources/Models/PagingInformation.swift | 74 + .../Sources/Models/PerfPowerMetric.swift | 115 + .../Models/PerfPowerMetricsResponse.swift | 49 + .../Sources/Models/PhasedReleaseState.swift | 13 + .../Swift/Sources/Models/Platform.swift | 12 + .../Models/PreReleaseVersionsResponse.swift | 55 + .../Sources/Models/PrereleaseVersion.swift | 375 + .../Models/PrereleaseVersionResponse.swift | 49 + .../Swift/Sources/Models/PreviewType.swift | 24 + .../Swift/Sources/Models/Profile.swift | 560 + .../Sources/Models/ProfileCreateRequest.swift | 397 + .../Sources/Models/ProfileResponse.swift | 49 + .../Sources/Models/ProfilesResponse.swift | 55 + .../Swift/Sources/Models/ResourceLinks.swift | 37 + .../Sources/Models/RoutingAppCoverage.swift | 266 + .../RoutingAppCoverageCreateRequest.swift | 224 + .../Models/RoutingAppCoverageResponse.swift | 43 + .../RoutingAppCoverageUpdateRequest.swift | 121 + .../Models/ScreenshotDisplayType.swift | 34 + .../Sources/Models/TerritoriesResponse.swift | 49 + .../Swift/Sources/Models/Territory.swift | 90 + .../Sources/Models/TerritoryResponse.swift | 43 + .../Sources/Models/UploadOperation.swift | 61 + .../Models/UploadOperationHeader.swift | 43 + .../generated/Swift/Sources/Models/User.swift | 278 + .../Swift/Sources/Models/UserInvitation.swift | 284 + .../Models/UserInvitationCreateRequest.swift | 248 + .../Models/UserInvitationResponse.swift | 49 + .../Models/UserInvitationsResponse.swift | 55 + .../Swift/Sources/Models/UserResponse.swift | 49 + .../Swift/Sources/Models/UserRole.swift | 20 + .../Sources/Models/UserUpdateRequest.swift | 236 + .../UserVisibleAppsLinkagesRequest.swift | 78 + .../UserVisibleAppsLinkagesResponse.swift | 90 + .../Swift/Sources/Models/UsersResponse.swift | 55 + .../Swift/Sources/RequestBehaviour.swift | 192 + .../AgeRatingDeclarationsUpdateInstance.swift | 150 + .../AppCategoriesGetCollection.swift | 188 + .../AppCategoriesGetInstance.swift | 176 + .../AppCategoriesParentGetToOneRelated.swift | 156 + ...egoriesSubcategoriesGetToManyRelated.swift | 163 + ...yptionDeclarationsAppGetToOneRelated.swift | 176 + ...ationsBuildsCreateToManyRelationship.swift | 142 + ...pEncryptionDeclarationsGetCollection.swift | 232 + ...AppEncryptionDeclarationsGetInstance.swift | 213 + .../AppInfoLocalizationsCreateInstance.swift | 119 + .../AppInfoLocalizationsDeleteInstance.swift | 145 + .../AppInfoLocalizationsGetInstance.swift | 171 + .../AppInfoLocalizationsUpdateInstance.swift | 150 + ...AppInfoLocalizationsGetToManyRelated.swift | 208 + .../AppInfos/AppInfosGetInstance.swift | 222 + ...pInfosPrimaryCategoryGetToOneRelated.swift | 156 + ...PrimarySubcategoryOneGetToOneRelated.swift | 156 + ...PrimarySubcategoryTwoGetToOneRelated.swift | 156 + ...nfosSecondaryCategoryGetToOneRelated.swift | 156 + ...condarySubcategoryOneGetToOneRelated.swift | 156 + ...condarySubcategoryTwoGetToOneRelated.swift | 156 + .../AppInfos/AppInfosUpdateInstance.swift | 150 + .../AppPreOrdersCreateInstance.swift | 119 + .../AppPreOrdersDeleteInstance.swift | 145 + .../AppPreOrdersGetInstance.swift | 168 + .../AppPreOrdersUpdateInstance.swift | 150 + ...eviewSetsAppPreviewsGetToManyRelated.swift | 197 + ...SetsAppPreviewsGetToManyRelationship.swift | 149 + ...AppPreviewsReplaceToManyRelationship.swift | 142 + .../AppPreviewSetsCreateInstance.swift | 119 + .../AppPreviewSetsDeleteInstance.swift | 145 + .../AppPreviewSetsGetInstance.swift | 198 + .../AppPreviewsCreateInstance.swift | 119 + .../AppPreviewsDeleteInstance.swift | 145 + .../AppPreviews/AppPreviewsGetInstance.swift | 176 + .../AppPreviewsUpdateInstance.swift | 150 + .../AppPricePointsGetCollection.swift | 187 + .../AppPricePointsGetInstance.swift | 182 + ...pPricePointsTerritoryGetToOneRelated.swift | 154 + .../AppPriceTiersGetCollection.swift | 186 + .../AppPriceTiersGetInstance.swift | 188 + ...riceTiersPricePointsGetToManyRelated.swift | 164 + .../AppPrices/AppPricesGetInstance.swift | 168 + ...otSetsAppScreenshotsGetToManyRelated.swift | 196 + ...sAppScreenshotsGetToManyRelationship.swift | 149 + ...ScreenshotsReplaceToManyRelationship.swift | 142 + .../AppScreenshotSetsCreateInstance.swift | 119 + .../AppScreenshotSetsDeleteInstance.swift | 145 + .../AppScreenshotSetsGetInstance.swift | 197 + .../AppScreenshotsCreateInstance.swift | 119 + .../AppScreenshotsDeleteInstance.swift | 145 + .../AppScreenshotsGetInstance.swift | 175 + .../AppScreenshotsUpdateInstance.swift | 150 + ...StoreReviewAttachmentsCreateInstance.swift | 119 + ...StoreReviewAttachmentsDeleteInstance.swift | 145 + ...AppStoreReviewAttachmentsGetInstance.swift | 172 + ...StoreReviewAttachmentsUpdateInstance.swift | 150 + ...oreReviewAttachmentsGetToManyRelated.swift | 200 + .../AppStoreReviewDetailsCreateInstance.swift | 119 + .../AppStoreReviewDetailsGetInstance.swift | 201 + .../AppStoreReviewDetailsUpdateInstance.swift | 150 + ...ationsAppPreviewSetsGetToManyRelated.swift | 245 + ...onsAppScreenshotSetsGetToManyRelated.swift | 254 + ...reVersionLocalizationsCreateInstance.swift | 119 + ...reVersionLocalizationsDeleteInstance.swift | 145 + ...StoreVersionLocalizationsGetInstance.swift | 219 + ...reVersionLocalizationsUpdateInstance.swift | 150 + ...eVersionPhasedReleasesCreateInstance.swift | 119 + ...eVersionPhasedReleasesDeleteInstance.swift | 145 + ...eVersionPhasedReleasesUpdateInstance.swift | 150 + ...toreVersionSubmissionsCreateInstance.swift | 119 + ...toreVersionSubmissionsDeleteInstance.swift | 145 + ...sAgeRatingDeclarationGetToOneRelated.swift | 167 + ...sAppStoreReviewDetailGetToOneRelated.swift | 223 + ...VersionLocalizationsGetToManyRelated.swift | 170 + ...eVersionPhasedReleaseGetToOneRelated.swift | 158 + ...toreVersionSubmissionGetToOneRelated.swift | 195 + ...AppStoreVersionsBuildGetToOneRelated.swift | 173 + ...oreVersionsBuildGetToOneRelationship.swift | 137 + ...VersionsBuildUpdateToOneRelationship.swift | 142 + .../AppStoreVersionsCreateInstance.swift | 119 + .../AppStoreVersionsDeleteInstance.swift | 145 + .../AppStoreVersionsGetInstance.swift | 358 + ...rsionsIdfaDeclarationGetToOneRelated.swift | 158 + ...onsRoutingAppCoverageGetToOneRelated.swift | 160 + .../AppStoreVersionsUpdateInstance.swift | 150 + .../Apps/AppsAppInfosGetToManyRelated.swift | 256 + ...AppsAppStoreVersionsGetToManyRelated.swift | 448 + ...AvailableTerritoriesGetToManyRelated.swift | 161 + ...BetaAppLocalizationsGetToManyRelated.swift | 167 + ...psBetaAppReviewDetailGetToOneRelated.swift | 162 + .../Apps/AppsBetaGroupsGetToManyRelated.swift | 172 + ...sBetaLicenseAgreementGetToOneRelated.swift | 155 + ...sBetaTestersDeleteToManyRelationship.swift | 142 + .../Apps/AppsBuildsGetToManyRelated.swift | 180 + ...dUserLicenseAgreementGetToOneRelated.swift | 156 + ...enterEnabledVersionsGetToManyRelated.swift | 253 + .../Requests/Apps/AppsGetCollection.swift | 634 + .../Requests/Apps/AppsGetInstance.swift | 542 + .../AppsInAppPurchasesGetToManyRelated.swift | 251 + ...AppsPerfPowerMetricsGetToManyRelated.swift | 178 + .../Apps/AppsPreOrderGetToOneRelated.swift | 156 + ...psPreReleaseVersionsGetToManyRelated.swift | 164 + .../Apps/AppsPricesGetToManyRelated.swift | 221 + .../Requests/Apps/AppsUpdateInstance.swift | 150 + ...taAppLocalizationsAppGetToOneRelated.swift | 176 + .../BetaAppLocalizationsCreateInstance.swift | 119 + .../BetaAppLocalizationsDeleteInstance.swift | 145 + .../BetaAppLocalizationsGetCollection.swift | 211 + .../BetaAppLocalizationsGetInstance.swift | 206 + .../BetaAppLocalizationsUpdateInstance.swift | 150 + ...taAppReviewDetailsAppGetToOneRelated.swift | 176 + .../BetaAppReviewDetailsGetCollection.swift | 204 + .../BetaAppReviewDetailsGetInstance.swift | 208 + .../BetaAppReviewDetailsUpdateInstance.swift | 150 + ...eviewSubmissionsBuildGetToOneRelated.swift | 173 + ...taAppReviewSubmissionsCreateInstance.swift | 119 + ...etaAppReviewSubmissionsGetCollection.swift | 209 + .../BetaAppReviewSubmissionsGetInstance.swift | 198 + ...ildLocalizationsBuildGetToOneRelated.swift | 173 + ...BetaBuildLocalizationsCreateInstance.swift | 119 + ...BetaBuildLocalizationsDeleteInstance.swift | 145 + .../BetaBuildLocalizationsGetCollection.swift | 204 + .../BetaBuildLocalizationsGetInstance.swift | 199 + ...BetaBuildLocalizationsUpdateInstance.swift | 150 + .../BetaGroupsAppGetToOneRelated.swift | 176 + ...sBetaTestersCreateToManyRelationship.swift | 142 + ...sBetaTestersDeleteToManyRelationship.swift | 142 + ...etaGroupsBetaTestersGetToManyRelated.swift | 167 + ...oupsBetaTestersGetToManyRelationship.swift | 149 + ...GroupsBuildsCreateToManyRelationship.swift | 142 + ...GroupsBuildsDeleteToManyRelationship.swift | 142 + .../BetaGroupsBuildsGetToManyRelated.swift | 180 + ...etaGroupsBuildsGetToManyRelationship.swift | 149 + .../BetaGroups/BetaGroupsCreateInstance.swift | 119 + .../BetaGroups/BetaGroupsDeleteInstance.swift | 145 + .../BetaGroups/BetaGroupsGetCollection.swift | 342 + .../BetaGroups/BetaGroupsGetInstance.swift | 276 + .../BetaGroups/BetaGroupsUpdateInstance.swift | 150 + ...aLicenseAgreementsAppGetToOneRelated.swift | 176 + .../BetaLicenseAgreementsGetCollection.swift | 199 + .../BetaLicenseAgreementsGetInstance.swift | 201 + .../BetaLicenseAgreementsUpdateInstance.swift | 150 + .../BetaTesterInvitationsCreateInstance.swift | 119 + ...aTestersAppsDeleteToManyRelationship.swift | 142 + .../BetaTestersAppsGetToManyRelated.swift | 183 + ...BetaTestersAppsGetToManyRelationship.swift | 149 + ...rsBetaGroupsCreateToManyRelationship.swift | 142 + ...rsBetaGroupsDeleteToManyRelationship.swift | 142 + ...etaTestersBetaGroupsGetToManyRelated.swift | 172 + ...stersBetaGroupsGetToManyRelationship.swift | 149 + ...estersBuildsCreateToManyRelationship.swift | 142 + ...estersBuildsDeleteToManyRelationship.swift | 142 + .../BetaTestersBuildsGetToManyRelated.swift | 180 + ...taTestersBuildsGetToManyRelationship.swift | 149 + .../BetaTestersCreateInstance.swift | 119 + .../BetaTestersDeleteInstance.swift | 145 + .../BetaTestersGetCollection.swift | 348 + .../BetaTesters/BetaTestersGetInstance.swift | 283 + ...BuildBetaDetailsBuildGetToOneRelated.swift | 173 + .../BuildBetaDetailsGetCollection.swift | 205 + .../BuildBetaDetailsGetInstance.swift | 200 + .../BuildBetaDetailsUpdateInstance.swift | 150 + ...BuildBetaNotificationsCreateInstance.swift | 119 + ...EncryptionDeclarationGetToOneRelated.swift | 167 + ...ptionDeclarationGetToOneRelationship.swift | 137 + ...onDeclarationUpdateToOneRelationship.swift | 142 + .../Builds/BuildsAppGetToOneRelated.swift | 176 + ...BuildsAppStoreVersionGetToOneRelated.swift | 171 + ...taAppReviewSubmissionGetToOneRelated.swift | 155 + ...taBuildLocalizationsGetToManyRelated.swift | 163 + ...dsBetaGroupsCreateToManyRelationship.swift | 142 + ...dsBetaGroupsDeleteToManyRelationship.swift | 142 + ...BuildsBuildBetaDetailGetToOneRelated.swift | 157 + ...DiagnosticSignaturesGetToManyRelated.swift | 176 + .../Requests/Builds/BuildsGetCollection.swift | 534 + .../Requests/Builds/BuildsGetInstance.swift | 419 + .../Builds/BuildsIconsGetToManyRelated.swift | 162 + ...idualTestersCreateToManyRelationship.swift | 142 + ...idualTestersDeleteToManyRelationship.swift | 142 + ...ldsIndividualTestersGetToManyRelated.swift | 167 + ...dividualTestersGetToManyRelationship.swift | 149 + ...ildsPerfPowerMetricsGetToManyRelated.swift | 178 + ...ildsPreReleaseVersionGetToOneRelated.swift | 157 + .../Builds/BuildsUpdateInstance.swift | 150 + .../BundleIdCapabilitiesCreateInstance.swift | 119 + .../BundleIdCapabilitiesDeleteInstance.swift | 145 + .../BundleIdCapabilitiesUpdateInstance.swift | 150 + .../BundleIdsAppGetToOneRelated.swift | 176 + ...BundleIdCapabilitiesGetToManyRelated.swift | 163 + .../BundleIds/BundleIdsCreateInstance.swift | 119 + .../BundleIds/BundleIdsDeleteInstance.swift | 145 + .../BundleIds/BundleIdsGetCollection.swift | 311 + .../BundleIds/BundleIdsGetInstance.swift | 258 + .../BundleIdsProfilesGetToManyRelated.swift | 171 + .../BundleIds/BundleIdsUpdateInstance.swift | 150 + .../CertificatesCreateInstance.swift | 119 + .../CertificatesDeleteInstance.swift | 145 + .../CertificatesGetCollection.swift | 212 + .../CertificatesGetInstance.swift | 161 + .../Devices/DevicesCreateInstance.swift | 119 + .../Devices/DevicesGetCollection.swift | 219 + .../Requests/Devices/DevicesGetInstance.swift | 160 + .../Devices/DevicesUpdateInstance.swift | 150 + ...nosticSignaturesLogsGetToManyRelated.swift | 149 + ...dUserLicenseAgreementsCreateInstance.swift | 119 + ...dUserLicenseAgreementsDeleteInstance.swift | 145 + .../EndUserLicenseAgreementsGetInstance.swift | 188 + ...greementsTerritoriesGetToManyRelated.swift | 161 + ...dUserLicenseAgreementsUpdateInstance.swift | 150 + .../FinanceReportsGetCollection.swift | 152 + ...ibleVersionsCreateToManyRelationship.swift | 142 + ...ibleVersionsDeleteToManyRelationship.swift | 142 + ...nsCompatibleVersionsGetToManyRelated.swift | 260 + ...patibleVersionsGetToManyRelationship.swift | 149 + ...bleVersionsReplaceToManyRelationship.swift | 142 + .../IdfaDeclarationsCreateInstance.swift | 119 + .../IdfaDeclarationsDeleteInstance.swift | 145 + .../IdfaDeclarationsUpdateInstance.swift | 150 + .../InAppPurchasesGetInstance.swift | 177 + ...PreReleaseVersionsAppGetToOneRelated.swift | 176 + ...eleaseVersionsBuildsGetToManyRelated.swift | 180 + .../PreReleaseVersionsGetCollection.swift | 303 + .../PreReleaseVersionsGetInstance.swift | 242 + .../ProfilesBundleIdGetToOneRelated.swift | 160 + ...ProfilesCertificatesGetToManyRelated.swift | 168 + .../Profiles/ProfilesCreateInstance.swift | 119 + .../Profiles/ProfilesDeleteInstance.swift | 145 + .../ProfilesDevicesGetToManyRelated.swift | 167 + .../Profiles/ProfilesGetCollection.swift | 309 + .../Profiles/ProfilesGetInstance.swift | 247 + .../RoutingAppCoveragesCreateInstance.swift | 119 + .../RoutingAppCoveragesDeleteInstance.swift | 145 + .../RoutingAppCoveragesGetInstance.swift | 172 + .../RoutingAppCoveragesUpdateInstance.swift | 150 + .../SalesReportsGetCollection.swift | 185 + .../TerritoriesGetCollection.swift | 145 + .../UserInvitationsCreateInstance.swift | 119 + .../UserInvitationsDeleteInstance.swift | 145 + .../UserInvitationsGetCollection.swift | 256 + .../UserInvitationsGetInstance.swift | 214 + ...vitationsVisibleAppsGetToManyRelated.swift | 183 + .../Requests/Users/UsersDeleteInstance.swift | 145 + .../Requests/Users/UsersGetCollection.swift | 255 + .../Requests/Users/UsersGetInstance.swift | 213 + .../Requests/Users/UsersUpdateInstance.swift | 150 + ...sVisibleAppsCreateToManyRelationship.swift | 142 + ...sVisibleAppsDeleteToManyRelationship.swift | 142 + .../UsersVisibleAppsGetToManyRelated.swift | 183 + ...sersVisibleAppsGetToManyRelationship.swift | 149 + ...VisibleAppsReplaceToManyRelationship.swift | 142 + Specs/AppStoreConnect/spec.json | 32545 ++++++++++++++++ 510 files changed, 115028 insertions(+) create mode 100644 Specs/AppStoreConnect/generated/Swift/AppStoreConnect.podspec create mode 100644 Specs/AppStoreConnect/generated/Swift/Cartfile create mode 100644 Specs/AppStoreConnect/generated/Swift/Info.plist create mode 100644 Specs/AppStoreConnect/generated/Swift/Package.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/README.md create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/API.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/APIClient.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/APIClientError.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/APIRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/APIResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/APIResult.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/APIService.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/AnyCodable.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Coding.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AgeRatingDeclaration.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AgeRatingDeclarationResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AgeRatingDeclarationUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/App.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppBetaTestersLinkagesRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategoriesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategory.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategoryResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclaration.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationBuildsLinkagesRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationState.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfo.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalization.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfosResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppMediaAssetState.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppMediaStateError.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrder.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrderCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrderResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrderUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreview.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSet.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetAppPreviewsLinkagesRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetAppPreviewsLinkagesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPrice.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePoint.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePointResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePointsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTier.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTierResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTiersResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshot.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSet.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetAppScreenshotsLinkagesRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetAppScreenshotsLinkagesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreAgeRating.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachment.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetail.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetailCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetailResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetailUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersion.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionBuildLinkageRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionBuildLinkageResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalization.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedRelease.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedReleaseCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedReleaseResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedReleaseUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionState.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmission.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmissionCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmissionResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/AppsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalization.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetail.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetailResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetailUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetailsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmission.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmissionCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmissionResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmissionsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalization.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroup.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBetaTestersLinkagesRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBetaTestersLinkagesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBuildsLinkagesRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBuildsLinkagesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaInviteType.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreement.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreementResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreementUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreementsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaReviewState.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTester.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterAppsLinkagesRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterAppsLinkagesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBetaGroupsLinkagesRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBetaGroupsLinkagesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBuildsLinkagesRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBuildsLinkagesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterInvitation.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterInvitationCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterInvitationResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTestersResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BrazilAgeRating.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/Build.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildAppEncryptionDeclarationLinkageRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildAppEncryptionDeclarationLinkageResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetail.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetailResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetailUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetailsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaGroupsLinkagesRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaNotification.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaNotificationCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaNotificationResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIcon.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIconsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIndividualTestersLinkagesRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIndividualTestersLinkagesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleId.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilitiesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapability.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilityCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilityResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilityUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdPlatform.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/CapabilityOption.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/CapabilitySetting.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/CapabilityType.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/Certificate.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificateCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificateResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificateType.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificatesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/Device.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/DeviceCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/DeviceResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/DeviceUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/DevicesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticLog.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticLogsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticSignature.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticSignaturesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/DocumentLinks.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreement.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreementCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreementResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreementUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/ErrorResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/ExternalBetaState.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersion.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersionCompatibleVersionsLinkagesRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersionCompatibleVersionsLinkagesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersionsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/IconAssetType.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclaration.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclarationCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclarationResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclarationUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/ImageAsset.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchase.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchaseResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchasesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/InternalBetaState.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/KidsAgeBand.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/PagedDocumentLinks.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/PagingInformation.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/PerfPowerMetric.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/PerfPowerMetricsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/PhasedReleaseState.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/Platform.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/PreReleaseVersionsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/PrereleaseVersion.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/PrereleaseVersionResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/PreviewType.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/Profile.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/ProfileCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/ProfileResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/ProfilesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/ResourceLinks.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverage.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverageCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverageResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverageUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/ScreenshotDisplayType.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/TerritoriesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/Territory.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/TerritoryResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/UploadOperation.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/UploadOperationHeader.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/User.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitation.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitationCreateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitationResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitationsResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/UserResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/UserRole.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/UserUpdateRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/UserVisibleAppsLinkagesRequest.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/UserVisibleAppsLinkagesResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Models/UsersResponse.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/RequestBehaviour.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AgeRatingDeclarations/AgeRatingDeclarationsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesParentGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesSubcategoriesGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsAppGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsBuildsCreateToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosAppInfoLocalizationsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosPrimaryCategoryGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosPrimarySubcategoryOneGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosPrimarySubcategoryTwoGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosSecondaryCategoryGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosSecondarySubcategoryOneGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosSecondarySubcategoryTwoGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsAppPreviewsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsAppPreviewsGetToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsAppPreviewsReplaceToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPricePoints/AppPricePointsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPricePoints/AppPricePointsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPricePoints/AppPricePointsTerritoryGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPriceTiers/AppPriceTiersGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPriceTiers/AppPriceTiersGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPriceTiers/AppPriceTiersPricePointsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPrices/AppPricesGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsAppScreenshotsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsAppScreenshotsGetToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsAppScreenshotsReplaceToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsAppStoreReviewAttachmentsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsAppPreviewSetsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsAppScreenshotSetsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleasesCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleasesDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleasesUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionSubmissions/AppStoreVersionSubmissionsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionSubmissions/AppStoreVersionSubmissionsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAgeRatingDeclarationGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreReviewDetailGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreVersionLocalizationsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreVersionPhasedReleaseGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreVersionSubmissionGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsBuildGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsBuildGetToOneRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsBuildUpdateToOneRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsIdfaDeclarationGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsRoutingAppCoverageGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsAppInfosGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsAppStoreVersionsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsAvailableTerritoriesGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaAppLocalizationsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaAppReviewDetailGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaGroupsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaLicenseAgreementGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaTestersDeleteToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBuildsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsEndUserLicenseAgreementGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGameCenterEnabledVersionsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsInAppPurchasesGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPerfPowerMetricsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPreOrderGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPreReleaseVersionsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPricesGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsAppGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsAppGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsBuildGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsBuildGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsAppGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersCreateToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersDeleteToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersGetToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsCreateToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsDeleteToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsGetToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsAppGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesterInvitations/BetaTesterInvitationsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersAppsDeleteToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersAppsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersAppsGetToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsCreateToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsDeleteToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsGetToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsCreateToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsDeleteToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsGetToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsBuildGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaNotifications/BuildBetaNotificationsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppEncryptionDeclarationGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppEncryptionDeclarationGetToOneRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppEncryptionDeclarationUpdateToOneRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppStoreVersionGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaAppReviewSubmissionGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaBuildLocalizationsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaGroupsCreateToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaGroupsDeleteToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBuildBetaDetailGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsDiagnosticSignaturesGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIconsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersCreateToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersDeleteToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersGetToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsPerfPowerMetricsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsPreReleaseVersionGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIdCapabilities/BundleIdCapabilitiesCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIdCapabilities/BundleIdCapabilitiesDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIdCapabilities/BundleIdCapabilitiesUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsAppGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsBundleIdCapabilitiesGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsProfilesGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/DiagnosticSignatures/DiagnosticSignaturesLogsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsTerritoriesGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/FinanceReports/FinanceReportsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsCreateToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsDeleteToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsGetToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsReplaceToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/IdfaDeclarations/IdfaDeclarationsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/IdfaDeclarations/IdfaDeclarationsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/IdfaDeclarations/IdfaDeclarationsUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/InAppPurchases/InAppPurchasesGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsAppGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsBuildsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesBundleIdGetToOneRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesCertificatesGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesDevicesGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/SalesReports/SalesReportsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Territories/TerritoriesGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsCreateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsVisibleAppsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersDeleteInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersGetCollection.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersGetInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersUpdateInstance.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsCreateToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsDeleteToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsGetToManyRelated.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsGetToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsReplaceToManyRelationship.swift create mode 100644 Specs/AppStoreConnect/spec.json diff --git a/Specs/AppStoreConnect/generated/Swift/AppStoreConnect.podspec b/Specs/AppStoreConnect/generated/Swift/AppStoreConnect.podspec new file mode 100644 index 000000000..000c360b5 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/AppStoreConnect.podspec @@ -0,0 +1,14 @@ +Pod::Spec.new do |s| + s.source_files = '*.swift' + s.name = 'AppStoreConnect' + s.authors = 'Yonas Kolb' + s.summary = 'A generated API' + s.version = '1.2' + s.homepage = 'https://github.com/yonaskolb/SwagGen' + s.source = { :git => 'git@github.com:https://github.com/yonaskolb/SwagGen.git' } + s.ios.deployment_target = '9.0' + s.tvos.deployment_target = '9.0' + s.osx.deployment_target = '10.9' + s.source_files = 'Sources/**/*.swift' + s.dependency 'Alamofire', '~> 4.9.0' +end diff --git a/Specs/AppStoreConnect/generated/Swift/Cartfile b/Specs/AppStoreConnect/generated/Swift/Cartfile new file mode 100644 index 000000000..77938bdd2 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Cartfile @@ -0,0 +1,2 @@ + +github "Alamofire/Alamofire" ~> 4.9.0 diff --git a/Specs/AppStoreConnect/generated/Swift/Info.plist b/Specs/AppStoreConnect/generated/Swift/Info.plist new file mode 100644 index 000000000..1007fd9dd --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Specs/AppStoreConnect/generated/Swift/Package.swift b/Specs/AppStoreConnect/generated/Swift/Package.swift new file mode 100644 index 000000000..64e455740 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Package.swift @@ -0,0 +1,18 @@ +// swift-tools-version:4.0 + +import PackageDescription + +let package = Package( + name: "AppStoreConnect", + products: [ + .library(name: "AppStoreConnect", targets: ["AppStoreConnect"]) + ], + dependencies: [ + .package(url: "https://github.com/Alamofire/Alamofire.git", .exact("4.9.0")), + ], + targets: [ + .target(name: "AppStoreConnect", dependencies: [ + "Alamofire", + ], path: "Sources") + ] +) diff --git a/Specs/AppStoreConnect/generated/Swift/README.md b/Specs/AppStoreConnect/generated/Swift/README.md new file mode 100644 index 000000000..1ebf3b703 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/README.md @@ -0,0 +1,697 @@ +# AppStoreConnect + +This is an api generated from a OpenAPI 3.0 spec with [SwagGen](https://github.com/yonaskolb/SwagGen) + +## Operation + +Each operation lives under the `AppStoreConnect` namespace and within an optional tag: `AppStoreConnect(.tagName).operationId`. If an operation doesn't have an operationId one will be generated from the path and method. + +Each operation has a nested `Request` and a `Response`, as well as a static `service` property + +#### Service + +This is the struct that contains the static information about an operation including it's id, tag, method, pre-modified path, and authorization requirements. It has a generic `ResponseType` type which maps to the `Response` type. +You shouldn't really need to interact with this service type. + +#### Request + +Each request is a subclass of `APIRequest` and has an `init` with a body param if it has a body, and a `options` struct for other url and path parameters. There is also a convenience init for passing parameters directly. +The `options` and `body` structs are both mutable so they can be modified before actually sending the request. + +#### Response + +The response is an enum of all the possible responses the request can return. it also contains getters for the `statusCode`, whether it was `successful`, and the actual decoded optional `success` response. If the operation only has one type of failure type there is also an optional `failure` type. + +## Model +Models that are sent and returned from the API are mutable classes. Each model is `Equatable` and `Codable`. + +`Required` properties are non optional and non-required are optional + +All properties can be passed into the initializer, with `required` properties being mandatory. + +If a model has `additionalProperties` it will have a subscript to access these by string + +## APIClient +The `APIClient` is used to encode, authorize, send, monitor, and decode the requests. There is a `APIClient.default` that uses the default `baseURL` otherwise a custom one can be initialized: + +```swift +public init(baseURL: String, sessionManager: SessionManager = .default, defaultHeaders: [String: String] = [:], behaviours: [RequestBehaviour] = []) +``` + +#### APIClient properties + +- `baseURL`: The base url that every request `path` will be appended to +- `behaviours`: A list of [Request Behaviours](#requestbehaviour) to add to every request +- `sessionManager`: An `Alamofire.SessionManager` that can be customized +- `defaultHeaders`: Headers that will be applied to every request +- `decodingQueue`: The `DispatchQueue` to decode responses on + +#### Making a request +To make a request first initialize a [Request](#request) and then pass it to `makeRequest`. The `complete` closure will be called with an `APIResponse` + +```swift +func makeRequest(_ request: APIRequest, behaviours: [RequestBehaviour] = [], queue: DispatchQueue = DispatchQueue.main, complete: @escaping (APIResponse) -> Void) -> Request? { +``` + +Example request (that is not neccessarily in this api): + +```swift + +let getUserRequest = AppStoreConnect.User.GetUser.Request(id: 123) +let apiClient = APIClient.default + +apiClient.makeRequest(getUserRequest) { apiResponse in + switch apiResponse { + case .result(let apiResponseValue): + if let user = apiResponseValue.success { + print("GetUser returned user \(user)") + } else { + print("GetUser returned \(apiResponseValue)") + } + case .error(let apiError): + print("GetUser failed with \(apiError)") + } +} +``` + +Each [Request](#request) also has a `makeRequest` convenience function that uses `AppStoreConnect.shared`. + +#### APIResponse +The `APIResponse` that gets passed to the completion closure contains the following properties: + +- `request`: The original request +- `result`: A `Result` type either containing an `APIClientError` or the [Response](#response) of the request +- `urlRequest`: The `URLRequest` used to send the request +- `urlResponse`: The `HTTPURLResponse` that was returned by the request +- `data`: The `Data` returned by the request. +- `timeline`: The `Alamofire.Timeline` of the request which contains timing information. + +#### Encoding and Decoding +Only JSON requests and responses are supported. These are encoded and decoded by `JSONEncoder` and `JSONDecoder` respectively, using Swift's `Codable` apis. +There are some options to control how invalid JSON is handled when decoding and these are available as static properties on `AppStoreConnect`: + +- `safeOptionalDecoding`: Whether to discard any errors when decoding optional properties. Defaults to `true`. +- `safeArrayDecoding`: Whether to remove invalid elements instead of throwing when decoding arrays. Defaults to `true`. + +Dates are encoded and decoded differently according to the swagger date format. They use different `DateFormatter`'s that you can set. +- `date-time` + - `DateTime.dateEncodingFormatter`: defaults to `yyyy-MM-dd'T'HH:mm:ss.Z` + - `DateTime.dateDecodingFormatters`: an array of date formatters. The first one to decode successfully will be used +- `date` + - `DateDay.dateFormatter`: defaults to `yyyy-MM-dd` + +#### APIClientError +This is error enum that `APIResponse.result` may contain: + +```swift +public enum APIClientError: Error { + case unexpectedStatusCode(statusCode: Int, data: Data) + case decodingError(DecodingError) + case requestEncodingError(String) + case validationError(String) + case networkError(Error) + case unknownError(Error) +} +``` + +#### RequestBehaviour +Request behaviours are used to modify, authorize, monitor or respond to requests. They can be added to the `APIClient.behaviours` for all requests, or they can passed into `makeRequest` for just that single request. + +`RequestBehaviour` is a protocol you can conform to with each function being optional. As the behaviours must work across multiple different request types, they only have access to a typed erased `AnyRequest`. + +```swift +public protocol RequestBehaviour { + + /// runs first and allows the requests to be modified. If modifying asynchronously use validate + func modifyRequest(request: AnyRequest, urlRequest: URLRequest) -> URLRequest + + /// validates and modifies the request. complete must be called with either .success or .fail + func validate(request: AnyRequest, urlRequest: URLRequest, complete: @escaping (RequestValidationResult) -> Void) + + /// called before request is sent + func beforeSend(request: AnyRequest) + + /// called when request successfuly returns a 200 range response + func onSuccess(request: AnyRequest, result: Any) + + /// called when request fails with an error. This will not be called if the request returns a known response even if the a status code is out of the 200 range + func onFailure(request: AnyRequest, error: APIClientError) + + /// called if the request recieves a network response. This is not called if request fails validation or encoding + func onResponse(request: AnyRequest, response: AnyResponse) +} +``` + +### Authorization +Each request has an optional `securityRequirement`. You can create a `RequestBehaviour` that checks this requirement and adds some form of authorization (usually via headers) in `validate` or `modifyRequest`. An alternative way is to set the `APIClient.defaultHeaders` which applies to all requests. + +#### Reactive and Promises +To add support for a specific asynchronous library, just add an extension on `APIClient` and add a function that wraps the `makeRequest` function and converts from a closure based syntax to returning the object of choice (stream, future...ect) + +## Models + +- **AgeRatingDeclaration** +- **AgeRatingDeclarationResponse** +- **AgeRatingDeclarationUpdateRequest** +- **App** +- **AppBetaTestersLinkagesRequest** +- **AppCategoriesResponse** +- **AppCategory** +- **AppCategoryResponse** +- **AppEncryptionDeclaration** +- **AppEncryptionDeclarationBuildsLinkagesRequest** +- **AppEncryptionDeclarationResponse** +- **AppEncryptionDeclarationState** +- **AppEncryptionDeclarationsResponse** +- **AppInfo** +- **AppInfoLocalization** +- **AppInfoLocalizationCreateRequest** +- **AppInfoLocalizationResponse** +- **AppInfoLocalizationUpdateRequest** +- **AppInfoLocalizationsResponse** +- **AppInfoResponse** +- **AppInfoUpdateRequest** +- **AppInfosResponse** +- **AppMediaAssetState** +- **AppMediaStateError** +- **AppPreOrder** +- **AppPreOrderCreateRequest** +- **AppPreOrderResponse** +- **AppPreOrderUpdateRequest** +- **AppPreview** +- **AppPreviewCreateRequest** +- **AppPreviewResponse** +- **AppPreviewSet** +- **AppPreviewSetAppPreviewsLinkagesRequest** +- **AppPreviewSetAppPreviewsLinkagesResponse** +- **AppPreviewSetCreateRequest** +- **AppPreviewSetResponse** +- **AppPreviewSetsResponse** +- **AppPreviewUpdateRequest** +- **AppPreviewsResponse** +- **AppPrice** +- **AppPricePoint** +- **AppPricePointResponse** +- **AppPricePointsResponse** +- **AppPriceResponse** +- **AppPriceTier** +- **AppPriceTierResponse** +- **AppPriceTiersResponse** +- **AppPricesResponse** +- **AppResponse** +- **AppScreenshot** +- **AppScreenshotCreateRequest** +- **AppScreenshotResponse** +- **AppScreenshotSet** +- **AppScreenshotSetAppScreenshotsLinkagesRequest** +- **AppScreenshotSetAppScreenshotsLinkagesResponse** +- **AppScreenshotSetCreateRequest** +- **AppScreenshotSetResponse** +- **AppScreenshotSetsResponse** +- **AppScreenshotUpdateRequest** +- **AppScreenshotsResponse** +- **AppStoreAgeRating** +- **AppStoreReviewAttachment** +- **AppStoreReviewAttachmentCreateRequest** +- **AppStoreReviewAttachmentResponse** +- **AppStoreReviewAttachmentUpdateRequest** +- **AppStoreReviewAttachmentsResponse** +- **AppStoreReviewDetail** +- **AppStoreReviewDetailCreateRequest** +- **AppStoreReviewDetailResponse** +- **AppStoreReviewDetailUpdateRequest** +- **AppStoreVersion** +- **AppStoreVersionBuildLinkageRequest** +- **AppStoreVersionBuildLinkageResponse** +- **AppStoreVersionCreateRequest** +- **AppStoreVersionLocalization** +- **AppStoreVersionLocalizationCreateRequest** +- **AppStoreVersionLocalizationResponse** +- **AppStoreVersionLocalizationUpdateRequest** +- **AppStoreVersionLocalizationsResponse** +- **AppStoreVersionPhasedRelease** +- **AppStoreVersionPhasedReleaseCreateRequest** +- **AppStoreVersionPhasedReleaseResponse** +- **AppStoreVersionPhasedReleaseUpdateRequest** +- **AppStoreVersionResponse** +- **AppStoreVersionState** +- **AppStoreVersionSubmission** +- **AppStoreVersionSubmissionCreateRequest** +- **AppStoreVersionSubmissionResponse** +- **AppStoreVersionUpdateRequest** +- **AppStoreVersionsResponse** +- **AppUpdateRequest** +- **AppsResponse** +- **BetaAppLocalization** +- **BetaAppLocalizationCreateRequest** +- **BetaAppLocalizationResponse** +- **BetaAppLocalizationUpdateRequest** +- **BetaAppLocalizationsResponse** +- **BetaAppReviewDetail** +- **BetaAppReviewDetailResponse** +- **BetaAppReviewDetailUpdateRequest** +- **BetaAppReviewDetailsResponse** +- **BetaAppReviewSubmission** +- **BetaAppReviewSubmissionCreateRequest** +- **BetaAppReviewSubmissionResponse** +- **BetaAppReviewSubmissionsResponse** +- **BetaBuildLocalization** +- **BetaBuildLocalizationCreateRequest** +- **BetaBuildLocalizationResponse** +- **BetaBuildLocalizationUpdateRequest** +- **BetaBuildLocalizationsResponse** +- **BetaGroup** +- **BetaGroupBetaTestersLinkagesRequest** +- **BetaGroupBetaTestersLinkagesResponse** +- **BetaGroupBuildsLinkagesRequest** +- **BetaGroupBuildsLinkagesResponse** +- **BetaGroupCreateRequest** +- **BetaGroupResponse** +- **BetaGroupUpdateRequest** +- **BetaGroupsResponse** +- **BetaInviteType** +- **BetaLicenseAgreement** +- **BetaLicenseAgreementResponse** +- **BetaLicenseAgreementUpdateRequest** +- **BetaLicenseAgreementsResponse** +- **BetaReviewState** +- **BetaTester** +- **BetaTesterAppsLinkagesRequest** +- **BetaTesterAppsLinkagesResponse** +- **BetaTesterBetaGroupsLinkagesRequest** +- **BetaTesterBetaGroupsLinkagesResponse** +- **BetaTesterBuildsLinkagesRequest** +- **BetaTesterBuildsLinkagesResponse** +- **BetaTesterCreateRequest** +- **BetaTesterInvitation** +- **BetaTesterInvitationCreateRequest** +- **BetaTesterInvitationResponse** +- **BetaTesterResponse** +- **BetaTestersResponse** +- **BrazilAgeRating** +- **Build** +- **BuildAppEncryptionDeclarationLinkageRequest** +- **BuildAppEncryptionDeclarationLinkageResponse** +- **BuildBetaDetail** +- **BuildBetaDetailResponse** +- **BuildBetaDetailUpdateRequest** +- **BuildBetaDetailsResponse** +- **BuildBetaGroupsLinkagesRequest** +- **BuildBetaNotification** +- **BuildBetaNotificationCreateRequest** +- **BuildBetaNotificationResponse** +- **BuildIcon** +- **BuildIconsResponse** +- **BuildIndividualTestersLinkagesRequest** +- **BuildIndividualTestersLinkagesResponse** +- **BuildResponse** +- **BuildUpdateRequest** +- **BuildsResponse** +- **BundleId** +- **BundleIdCapabilitiesResponse** +- **BundleIdCapability** +- **BundleIdCapabilityCreateRequest** +- **BundleIdCapabilityResponse** +- **BundleIdCapabilityUpdateRequest** +- **BundleIdCreateRequest** +- **BundleIdPlatform** +- **BundleIdResponse** +- **BundleIdUpdateRequest** +- **BundleIdsResponse** +- **CapabilityOption** +- **CapabilitySetting** +- **CapabilityType** +- **Certificate** +- **CertificateCreateRequest** +- **CertificateResponse** +- **CertificateType** +- **CertificatesResponse** +- **Device** +- **DeviceCreateRequest** +- **DeviceResponse** +- **DeviceUpdateRequest** +- **DevicesResponse** +- **DiagnosticLog** +- **DiagnosticLogsResponse** +- **DiagnosticSignature** +- **DiagnosticSignaturesResponse** +- **DocumentLinks** +- **EndUserLicenseAgreement** +- **EndUserLicenseAgreementCreateRequest** +- **EndUserLicenseAgreementResponse** +- **EndUserLicenseAgreementUpdateRequest** +- **ErrorResponse** +- **ExternalBetaState** +- **GameCenterEnabledVersion** +- **GameCenterEnabledVersionCompatibleVersionsLinkagesRequest** +- **GameCenterEnabledVersionCompatibleVersionsLinkagesResponse** +- **GameCenterEnabledVersionsResponse** +- **IconAssetType** +- **IdfaDeclaration** +- **IdfaDeclarationCreateRequest** +- **IdfaDeclarationResponse** +- **IdfaDeclarationUpdateRequest** +- **ImageAsset** +- **InAppPurchase** +- **InAppPurchaseResponse** +- **InAppPurchasesResponse** +- **InternalBetaState** +- **KidsAgeBand** +- **PagedDocumentLinks** +- **PagingInformation** +- **PerfPowerMetric** +- **PerfPowerMetricsResponse** +- **PhasedReleaseState** +- **Platform** +- **PreReleaseVersionsResponse** +- **PrereleaseVersion** +- **PrereleaseVersionResponse** +- **PreviewType** +- **Profile** +- **ProfileCreateRequest** +- **ProfileResponse** +- **ProfilesResponse** +- **ResourceLinks** +- **RoutingAppCoverage** +- **RoutingAppCoverageCreateRequest** +- **RoutingAppCoverageResponse** +- **RoutingAppCoverageUpdateRequest** +- **ScreenshotDisplayType** +- **TerritoriesResponse** +- **Territory** +- **TerritoryResponse** +- **UploadOperation** +- **UploadOperationHeader** +- **User** +- **UserInvitation** +- **UserInvitationCreateRequest** +- **UserInvitationResponse** +- **UserInvitationsResponse** +- **UserResponse** +- **UserRole** +- **UserUpdateRequest** +- **UserVisibleAppsLinkagesRequest** +- **UserVisibleAppsLinkagesResponse** +- **UsersResponse** + +## Requests + +- **AppStoreConnect.AgeRatingDeclarations** + - **AgeRatingDeclarationsUpdateInstance**: PATCH `/v1/ageratingdeclarations/{id}` +- **AppStoreConnect.AppCategories** + - **AppCategoriesGetCollection**: GET `/v1/appcategories` + - **AppCategoriesGetInstance**: GET `/v1/appcategories/{id}` + - **AppCategoriesParentGetToOneRelated**: GET `/v1/appcategories/{id}/parent` + - **AppCategoriesSubcategoriesGetToManyRelated**: GET `/v1/appcategories/{id}/subcategories` +- **AppStoreConnect.AppEncryptionDeclarations** + - **AppEncryptionDeclarationsAppGetToOneRelated**: GET `/v1/appencryptiondeclarations/{id}/app` + - **AppEncryptionDeclarationsBuildsCreateToManyRelationship**: POST `/v1/appencryptiondeclarations/{id}/relationships/builds` + - **AppEncryptionDeclarationsGetCollection**: GET `/v1/appencryptiondeclarations` + - **AppEncryptionDeclarationsGetInstance**: GET `/v1/appencryptiondeclarations/{id}` +- **AppStoreConnect.AppInfoLocalizations** + - **AppInfoLocalizationsCreateInstance**: POST `/v1/appinfolocalizations` + - **AppInfoLocalizationsDeleteInstance**: DELETE `/v1/appinfolocalizations/{id}` + - **AppInfoLocalizationsGetInstance**: GET `/v1/appinfolocalizations/{id}` + - **AppInfoLocalizationsUpdateInstance**: PATCH `/v1/appinfolocalizations/{id}` +- **AppStoreConnect.AppInfos** + - **AppInfosAppInfoLocalizationsGetToManyRelated**: GET `/v1/appinfos/{id}/appinfolocalizations` + - **AppInfosGetInstance**: GET `/v1/appinfos/{id}` + - **AppInfosPrimaryCategoryGetToOneRelated**: GET `/v1/appinfos/{id}/primarycategory` + - **AppInfosPrimarySubcategoryOneGetToOneRelated**: GET `/v1/appinfos/{id}/primarysubcategoryone` + - **AppInfosPrimarySubcategoryTwoGetToOneRelated**: GET `/v1/appinfos/{id}/primarysubcategorytwo` + - **AppInfosSecondaryCategoryGetToOneRelated**: GET `/v1/appinfos/{id}/secondarycategory` + - **AppInfosSecondarySubcategoryOneGetToOneRelated**: GET `/v1/appinfos/{id}/secondarysubcategoryone` + - **AppInfosSecondarySubcategoryTwoGetToOneRelated**: GET `/v1/appinfos/{id}/secondarysubcategorytwo` + - **AppInfosUpdateInstance**: PATCH `/v1/appinfos/{id}` +- **AppStoreConnect.AppPreOrders** + - **AppPreOrdersCreateInstance**: POST `/v1/apppreorders` + - **AppPreOrdersDeleteInstance**: DELETE `/v1/apppreorders/{id}` + - **AppPreOrdersGetInstance**: GET `/v1/apppreorders/{id}` + - **AppPreOrdersUpdateInstance**: PATCH `/v1/apppreorders/{id}` +- **AppStoreConnect.AppPreviews** + - **AppPreviewsCreateInstance**: POST `/v1/apppreviews` + - **AppPreviewsDeleteInstance**: DELETE `/v1/apppreviews/{id}` + - **AppPreviewsGetInstance**: GET `/v1/apppreviews/{id}` + - **AppPreviewsUpdateInstance**: PATCH `/v1/apppreviews/{id}` +- **AppStoreConnect.AppPreviewSets** + - **AppPreviewSetsAppPreviewsGetToManyRelated**: GET `/v1/apppreviewsets/{id}/apppreviews` + - **AppPreviewSetsAppPreviewsGetToManyRelationship**: GET `/v1/apppreviewsets/{id}/relationships/apppreviews` + - **AppPreviewSetsAppPreviewsReplaceToManyRelationship**: PATCH `/v1/apppreviewsets/{id}/relationships/apppreviews` + - **AppPreviewSetsCreateInstance**: POST `/v1/apppreviewsets` + - **AppPreviewSetsDeleteInstance**: DELETE `/v1/apppreviewsets/{id}` + - **AppPreviewSetsGetInstance**: GET `/v1/apppreviewsets/{id}` +- **AppStoreConnect.AppPricePoints** + - **AppPricePointsGetCollection**: GET `/v1/apppricepoints` + - **AppPricePointsGetInstance**: GET `/v1/apppricepoints/{id}` + - **AppPricePointsTerritoryGetToOneRelated**: GET `/v1/apppricepoints/{id}/territory` +- **AppStoreConnect.AppPrices** + - **AppPricesGetInstance**: GET `/v1/appprices/{id}` +- **AppStoreConnect.AppPriceTiers** + - **AppPriceTiersGetCollection**: GET `/v1/apppricetiers` + - **AppPriceTiersGetInstance**: GET `/v1/apppricetiers/{id}` + - **AppPriceTiersPricePointsGetToManyRelated**: GET `/v1/apppricetiers/{id}/pricepoints` +- **AppStoreConnect.Apps** + - **AppsAppInfosGetToManyRelated**: GET `/v1/apps/{id}/appinfos` + - **AppsAppStoreVersionsGetToManyRelated**: GET `/v1/apps/{id}/appstoreversions` + - **AppsAvailableTerritoriesGetToManyRelated**: GET `/v1/apps/{id}/availableterritories` + - **AppsBetaAppLocalizationsGetToManyRelated**: GET `/v1/apps/{id}/betaapplocalizations` + - **AppsBetaAppReviewDetailGetToOneRelated**: GET `/v1/apps/{id}/betaappreviewdetail` + - **AppsBetaGroupsGetToManyRelated**: GET `/v1/apps/{id}/betagroups` + - **AppsBetaLicenseAgreementGetToOneRelated**: GET `/v1/apps/{id}/betalicenseagreement` + - **AppsBetaTestersDeleteToManyRelationship**: DELETE `/v1/apps/{id}/relationships/betatesters` + - **AppsBuildsGetToManyRelated**: GET `/v1/apps/{id}/builds` + - **AppsEndUserLicenseAgreementGetToOneRelated**: GET `/v1/apps/{id}/enduserlicenseagreement` + - **AppsGameCenterEnabledVersionsGetToManyRelated**: GET `/v1/apps/{id}/gamecenterenabledversions` + - **AppsGetCollection**: GET `/v1/apps` + - **AppsGetInstance**: GET `/v1/apps/{id}` + - **AppsInAppPurchasesGetToManyRelated**: GET `/v1/apps/{id}/inapppurchases` + - **AppsPerfPowerMetricsGetToManyRelated**: GET `/v1/apps/{id}/perfpowermetrics` + - **AppsPreOrderGetToOneRelated**: GET `/v1/apps/{id}/preorder` + - **AppsPreReleaseVersionsGetToManyRelated**: GET `/v1/apps/{id}/prereleaseversions` + - **AppsPricesGetToManyRelated**: GET `/v1/apps/{id}/prices` + - **AppsUpdateInstance**: PATCH `/v1/apps/{id}` +- **AppStoreConnect.AppScreenshots** + - **AppScreenshotsCreateInstance**: POST `/v1/appscreenshots` + - **AppScreenshotsDeleteInstance**: DELETE `/v1/appscreenshots/{id}` + - **AppScreenshotsGetInstance**: GET `/v1/appscreenshots/{id}` + - **AppScreenshotsUpdateInstance**: PATCH `/v1/appscreenshots/{id}` +- **AppStoreConnect.AppScreenshotSets** + - **AppScreenshotSetsAppScreenshotsGetToManyRelated**: GET `/v1/appscreenshotsets/{id}/appscreenshots` + - **AppScreenshotSetsAppScreenshotsGetToManyRelationship**: GET `/v1/appscreenshotsets/{id}/relationships/appscreenshots` + - **AppScreenshotSetsAppScreenshotsReplaceToManyRelationship**: PATCH `/v1/appscreenshotsets/{id}/relationships/appscreenshots` + - **AppScreenshotSetsCreateInstance**: POST `/v1/appscreenshotsets` + - **AppScreenshotSetsDeleteInstance**: DELETE `/v1/appscreenshotsets/{id}` + - **AppScreenshotSetsGetInstance**: GET `/v1/appscreenshotsets/{id}` +- **AppStoreConnect.AppStoreReviewAttachments** + - **AppStoreReviewAttachmentsCreateInstance**: POST `/v1/appstorereviewattachments` + - **AppStoreReviewAttachmentsDeleteInstance**: DELETE `/v1/appstorereviewattachments/{id}` + - **AppStoreReviewAttachmentsGetInstance**: GET `/v1/appstorereviewattachments/{id}` + - **AppStoreReviewAttachmentsUpdateInstance**: PATCH `/v1/appstorereviewattachments/{id}` +- **AppStoreConnect.AppStoreReviewDetails** + - **AppStoreReviewDetailsAppStoreReviewAttachmentsGetToManyRelated**: GET `/v1/appstorereviewdetails/{id}/appstorereviewattachments` + - **AppStoreReviewDetailsCreateInstance**: POST `/v1/appstorereviewdetails` + - **AppStoreReviewDetailsGetInstance**: GET `/v1/appstorereviewdetails/{id}` + - **AppStoreReviewDetailsUpdateInstance**: PATCH `/v1/appstorereviewdetails/{id}` +- **AppStoreConnect.AppStoreVersionLocalizations** + - **AppStoreVersionLocalizationsAppPreviewSetsGetToManyRelated**: GET `/v1/appstoreversionlocalizations/{id}/apppreviewsets` + - **AppStoreVersionLocalizationsAppScreenshotSetsGetToManyRelated**: GET `/v1/appstoreversionlocalizations/{id}/appscreenshotsets` + - **AppStoreVersionLocalizationsCreateInstance**: POST `/v1/appstoreversionlocalizations` + - **AppStoreVersionLocalizationsDeleteInstance**: DELETE `/v1/appstoreversionlocalizations/{id}` + - **AppStoreVersionLocalizationsGetInstance**: GET `/v1/appstoreversionlocalizations/{id}` + - **AppStoreVersionLocalizationsUpdateInstance**: PATCH `/v1/appstoreversionlocalizations/{id}` +- **AppStoreConnect.AppStoreVersionPhasedReleases** + - **AppStoreVersionPhasedReleasesCreateInstance**: POST `/v1/appstoreversionphasedreleases` + - **AppStoreVersionPhasedReleasesDeleteInstance**: DELETE `/v1/appstoreversionphasedreleases/{id}` + - **AppStoreVersionPhasedReleasesUpdateInstance**: PATCH `/v1/appstoreversionphasedreleases/{id}` +- **AppStoreConnect.AppStoreVersions** + - **AppStoreVersionsAgeRatingDeclarationGetToOneRelated**: GET `/v1/appstoreversions/{id}/ageratingdeclaration` + - **AppStoreVersionsAppStoreReviewDetailGetToOneRelated**: GET `/v1/appstoreversions/{id}/appstorereviewdetail` + - **AppStoreVersionsAppStoreVersionLocalizationsGetToManyRelated**: GET `/v1/appstoreversions/{id}/appstoreversionlocalizations` + - **AppStoreVersionsAppStoreVersionPhasedReleaseGetToOneRelated**: GET `/v1/appstoreversions/{id}/appstoreversionphasedrelease` + - **AppStoreVersionsAppStoreVersionSubmissionGetToOneRelated**: GET `/v1/appstoreversions/{id}/appstoreversionsubmission` + - **AppStoreVersionsBuildGetToOneRelated**: GET `/v1/appstoreversions/{id}/build` + - **AppStoreVersionsBuildGetToOneRelationship**: GET `/v1/appstoreversions/{id}/relationships/build` + - **AppStoreVersionsBuildUpdateToOneRelationship**: PATCH `/v1/appstoreversions/{id}/relationships/build` + - **AppStoreVersionsCreateInstance**: POST `/v1/appstoreversions` + - **AppStoreVersionsDeleteInstance**: DELETE `/v1/appstoreversions/{id}` + - **AppStoreVersionsGetInstance**: GET `/v1/appstoreversions/{id}` + - **AppStoreVersionsIdfaDeclarationGetToOneRelated**: GET `/v1/appstoreversions/{id}/idfadeclaration` + - **AppStoreVersionsRoutingAppCoverageGetToOneRelated**: GET `/v1/appstoreversions/{id}/routingappcoverage` + - **AppStoreVersionsUpdateInstance**: PATCH `/v1/appstoreversions/{id}` +- **AppStoreConnect.AppStoreVersionSubmissions** + - **AppStoreVersionSubmissionsCreateInstance**: POST `/v1/appstoreversionsubmissions` + - **AppStoreVersionSubmissionsDeleteInstance**: DELETE `/v1/appstoreversionsubmissions/{id}` +- **AppStoreConnect.BetaAppLocalizations** + - **BetaAppLocalizationsAppGetToOneRelated**: GET `/v1/betaapplocalizations/{id}/app` + - **BetaAppLocalizationsCreateInstance**: POST `/v1/betaapplocalizations` + - **BetaAppLocalizationsDeleteInstance**: DELETE `/v1/betaapplocalizations/{id}` + - **BetaAppLocalizationsGetCollection**: GET `/v1/betaapplocalizations` + - **BetaAppLocalizationsGetInstance**: GET `/v1/betaapplocalizations/{id}` + - **BetaAppLocalizationsUpdateInstance**: PATCH `/v1/betaapplocalizations/{id}` +- **AppStoreConnect.BetaAppReviewDetails** + - **BetaAppReviewDetailsAppGetToOneRelated**: GET `/v1/betaappreviewdetails/{id}/app` + - **BetaAppReviewDetailsGetCollection**: GET `/v1/betaappreviewdetails` + - **BetaAppReviewDetailsGetInstance**: GET `/v1/betaappreviewdetails/{id}` + - **BetaAppReviewDetailsUpdateInstance**: PATCH `/v1/betaappreviewdetails/{id}` +- **AppStoreConnect.BetaAppReviewSubmissions** + - **BetaAppReviewSubmissionsBuildGetToOneRelated**: GET `/v1/betaappreviewsubmissions/{id}/build` + - **BetaAppReviewSubmissionsCreateInstance**: POST `/v1/betaappreviewsubmissions` + - **BetaAppReviewSubmissionsGetCollection**: GET `/v1/betaappreviewsubmissions` + - **BetaAppReviewSubmissionsGetInstance**: GET `/v1/betaappreviewsubmissions/{id}` +- **AppStoreConnect.BetaBuildLocalizations** + - **BetaBuildLocalizationsBuildGetToOneRelated**: GET `/v1/betabuildlocalizations/{id}/build` + - **BetaBuildLocalizationsCreateInstance**: POST `/v1/betabuildlocalizations` + - **BetaBuildLocalizationsDeleteInstance**: DELETE `/v1/betabuildlocalizations/{id}` + - **BetaBuildLocalizationsGetCollection**: GET `/v1/betabuildlocalizations` + - **BetaBuildLocalizationsGetInstance**: GET `/v1/betabuildlocalizations/{id}` + - **BetaBuildLocalizationsUpdateInstance**: PATCH `/v1/betabuildlocalizations/{id}` +- **AppStoreConnect.BetaGroups** + - **BetaGroupsAppGetToOneRelated**: GET `/v1/betagroups/{id}/app` + - **BetaGroupsBetaTestersCreateToManyRelationship**: POST `/v1/betagroups/{id}/relationships/betatesters` + - **BetaGroupsBetaTestersDeleteToManyRelationship**: DELETE `/v1/betagroups/{id}/relationships/betatesters` + - **BetaGroupsBetaTestersGetToManyRelated**: GET `/v1/betagroups/{id}/betatesters` + - **BetaGroupsBetaTestersGetToManyRelationship**: GET `/v1/betagroups/{id}/relationships/betatesters` + - **BetaGroupsBuildsCreateToManyRelationship**: POST `/v1/betagroups/{id}/relationships/builds` + - **BetaGroupsBuildsDeleteToManyRelationship**: DELETE `/v1/betagroups/{id}/relationships/builds` + - **BetaGroupsBuildsGetToManyRelated**: GET `/v1/betagroups/{id}/builds` + - **BetaGroupsBuildsGetToManyRelationship**: GET `/v1/betagroups/{id}/relationships/builds` + - **BetaGroupsCreateInstance**: POST `/v1/betagroups` + - **BetaGroupsDeleteInstance**: DELETE `/v1/betagroups/{id}` + - **BetaGroupsGetCollection**: GET `/v1/betagroups` + - **BetaGroupsGetInstance**: GET `/v1/betagroups/{id}` + - **BetaGroupsUpdateInstance**: PATCH `/v1/betagroups/{id}` +- **AppStoreConnect.BetaLicenseAgreements** + - **BetaLicenseAgreementsAppGetToOneRelated**: GET `/v1/betalicenseagreements/{id}/app` + - **BetaLicenseAgreementsGetCollection**: GET `/v1/betalicenseagreements` + - **BetaLicenseAgreementsGetInstance**: GET `/v1/betalicenseagreements/{id}` + - **BetaLicenseAgreementsUpdateInstance**: PATCH `/v1/betalicenseagreements/{id}` +- **AppStoreConnect.BetaTesterInvitations** + - **BetaTesterInvitationsCreateInstance**: POST `/v1/betatesterinvitations` +- **AppStoreConnect.BetaTesters** + - **BetaTestersAppsDeleteToManyRelationship**: DELETE `/v1/betatesters/{id}/relationships/apps` + - **BetaTestersAppsGetToManyRelated**: GET `/v1/betatesters/{id}/apps` + - **BetaTestersAppsGetToManyRelationship**: GET `/v1/betatesters/{id}/relationships/apps` + - **BetaTestersBetaGroupsCreateToManyRelationship**: POST `/v1/betatesters/{id}/relationships/betagroups` + - **BetaTestersBetaGroupsDeleteToManyRelationship**: DELETE `/v1/betatesters/{id}/relationships/betagroups` + - **BetaTestersBetaGroupsGetToManyRelated**: GET `/v1/betatesters/{id}/betagroups` + - **BetaTestersBetaGroupsGetToManyRelationship**: GET `/v1/betatesters/{id}/relationships/betagroups` + - **BetaTestersBuildsCreateToManyRelationship**: POST `/v1/betatesters/{id}/relationships/builds` + - **BetaTestersBuildsDeleteToManyRelationship**: DELETE `/v1/betatesters/{id}/relationships/builds` + - **BetaTestersBuildsGetToManyRelated**: GET `/v1/betatesters/{id}/builds` + - **BetaTestersBuildsGetToManyRelationship**: GET `/v1/betatesters/{id}/relationships/builds` + - **BetaTestersCreateInstance**: POST `/v1/betatesters` + - **BetaTestersDeleteInstance**: DELETE `/v1/betatesters/{id}` + - **BetaTestersGetCollection**: GET `/v1/betatesters` + - **BetaTestersGetInstance**: GET `/v1/betatesters/{id}` +- **AppStoreConnect.BuildBetaDetails** + - **BuildBetaDetailsBuildGetToOneRelated**: GET `/v1/buildbetadetails/{id}/build` + - **BuildBetaDetailsGetCollection**: GET `/v1/buildbetadetails` + - **BuildBetaDetailsGetInstance**: GET `/v1/buildbetadetails/{id}` + - **BuildBetaDetailsUpdateInstance**: PATCH `/v1/buildbetadetails/{id}` +- **AppStoreConnect.BuildBetaNotifications** + - **BuildBetaNotificationsCreateInstance**: POST `/v1/buildbetanotifications` +- **AppStoreConnect.Builds** + - **BuildsAppGetToOneRelated**: GET `/v1/builds/{id}/app` + - **BuildsAppEncryptionDeclarationGetToOneRelated**: GET `/v1/builds/{id}/appencryptiondeclaration` + - **BuildsAppEncryptionDeclarationGetToOneRelationship**: GET `/v1/builds/{id}/relationships/appencryptiondeclaration` + - **BuildsAppEncryptionDeclarationUpdateToOneRelationship**: PATCH `/v1/builds/{id}/relationships/appencryptiondeclaration` + - **BuildsAppStoreVersionGetToOneRelated**: GET `/v1/builds/{id}/appstoreversion` + - **BuildsBetaAppReviewSubmissionGetToOneRelated**: GET `/v1/builds/{id}/betaappreviewsubmission` + - **BuildsBetaBuildLocalizationsGetToManyRelated**: GET `/v1/builds/{id}/betabuildlocalizations` + - **BuildsBetaGroupsCreateToManyRelationship**: POST `/v1/builds/{id}/relationships/betagroups` + - **BuildsBetaGroupsDeleteToManyRelationship**: DELETE `/v1/builds/{id}/relationships/betagroups` + - **BuildsBuildBetaDetailGetToOneRelated**: GET `/v1/builds/{id}/buildbetadetail` + - **BuildsDiagnosticSignaturesGetToManyRelated**: GET `/v1/builds/{id}/diagnosticsignatures` + - **BuildsGetCollection**: GET `/v1/builds` + - **BuildsGetInstance**: GET `/v1/builds/{id}` + - **BuildsIconsGetToManyRelated**: GET `/v1/builds/{id}/icons` + - **BuildsIndividualTestersCreateToManyRelationship**: POST `/v1/builds/{id}/relationships/individualtesters` + - **BuildsIndividualTestersDeleteToManyRelationship**: DELETE `/v1/builds/{id}/relationships/individualtesters` + - **BuildsIndividualTestersGetToManyRelated**: GET `/v1/builds/{id}/individualtesters` + - **BuildsIndividualTestersGetToManyRelationship**: GET `/v1/builds/{id}/relationships/individualtesters` + - **BuildsPerfPowerMetricsGetToManyRelated**: GET `/v1/builds/{id}/perfpowermetrics` + - **BuildsPreReleaseVersionGetToOneRelated**: GET `/v1/builds/{id}/prereleaseversion` + - **BuildsUpdateInstance**: PATCH `/v1/builds/{id}` +- **AppStoreConnect.BundleIdCapabilities** + - **BundleIdCapabilitiesCreateInstance**: POST `/v1/bundleidcapabilities` + - **BundleIdCapabilitiesDeleteInstance**: DELETE `/v1/bundleidcapabilities/{id}` + - **BundleIdCapabilitiesUpdateInstance**: PATCH `/v1/bundleidcapabilities/{id}` +- **AppStoreConnect.BundleIds** + - **BundleIdsAppGetToOneRelated**: GET `/v1/bundleids/{id}/app` + - **BundleIdsBundleIdCapabilitiesGetToManyRelated**: GET `/v1/bundleids/{id}/bundleidcapabilities` + - **BundleIdsCreateInstance**: POST `/v1/bundleids` + - **BundleIdsDeleteInstance**: DELETE `/v1/bundleids/{id}` + - **BundleIdsGetCollection**: GET `/v1/bundleids` + - **BundleIdsGetInstance**: GET `/v1/bundleids/{id}` + - **BundleIdsProfilesGetToManyRelated**: GET `/v1/bundleids/{id}/profiles` + - **BundleIdsUpdateInstance**: PATCH `/v1/bundleids/{id}` +- **AppStoreConnect.Certificates** + - **CertificatesCreateInstance**: POST `/v1/certificates` + - **CertificatesDeleteInstance**: DELETE `/v1/certificates/{id}` + - **CertificatesGetCollection**: GET `/v1/certificates` + - **CertificatesGetInstance**: GET `/v1/certificates/{id}` +- **AppStoreConnect.Devices** + - **DevicesCreateInstance**: POST `/v1/devices` + - **DevicesGetCollection**: GET `/v1/devices` + - **DevicesGetInstance**: GET `/v1/devices/{id}` + - **DevicesUpdateInstance**: PATCH `/v1/devices/{id}` +- **AppStoreConnect.DiagnosticSignatures** + - **DiagnosticSignaturesLogsGetToManyRelated**: GET `/v1/diagnosticsignatures/{id}/logs` +- **AppStoreConnect.EndUserLicenseAgreements** + - **EndUserLicenseAgreementsCreateInstance**: POST `/v1/enduserlicenseagreements` + - **EndUserLicenseAgreementsDeleteInstance**: DELETE `/v1/enduserlicenseagreements/{id}` + - **EndUserLicenseAgreementsGetInstance**: GET `/v1/enduserlicenseagreements/{id}` + - **EndUserLicenseAgreementsTerritoriesGetToManyRelated**: GET `/v1/enduserlicenseagreements/{id}/territories` + - **EndUserLicenseAgreementsUpdateInstance**: PATCH `/v1/enduserlicenseagreements/{id}` +- **AppStoreConnect.FinanceReports** + - **FinanceReportsGetCollection**: GET `/v1/financereports` +- **AppStoreConnect.GameCenterEnabledVersions** + - **GameCenterEnabledVersionsCompatibleVersionsCreateToManyRelationship**: POST `/v1/gamecenterenabledversions/{id}/relationships/compatibleversions` + - **GameCenterEnabledVersionsCompatibleVersionsDeleteToManyRelationship**: DELETE `/v1/gamecenterenabledversions/{id}/relationships/compatibleversions` + - **GameCenterEnabledVersionsCompatibleVersionsGetToManyRelated**: GET `/v1/gamecenterenabledversions/{id}/compatibleversions` + - **GameCenterEnabledVersionsCompatibleVersionsGetToManyRelationship**: GET `/v1/gamecenterenabledversions/{id}/relationships/compatibleversions` + - **GameCenterEnabledVersionsCompatibleVersionsReplaceToManyRelationship**: PATCH `/v1/gamecenterenabledversions/{id}/relationships/compatibleversions` +- **AppStoreConnect.IdfaDeclarations** + - **IdfaDeclarationsCreateInstance**: POST `/v1/idfadeclarations` + - **IdfaDeclarationsDeleteInstance**: DELETE `/v1/idfadeclarations/{id}` + - **IdfaDeclarationsUpdateInstance**: PATCH `/v1/idfadeclarations/{id}` +- **AppStoreConnect.InAppPurchases** + - **InAppPurchasesGetInstance**: GET `/v1/inapppurchases/{id}` +- **AppStoreConnect.PreReleaseVersions** + - **PreReleaseVersionsAppGetToOneRelated**: GET `/v1/prereleaseversions/{id}/app` + - **PreReleaseVersionsBuildsGetToManyRelated**: GET `/v1/prereleaseversions/{id}/builds` + - **PreReleaseVersionsGetCollection**: GET `/v1/prereleaseversions` + - **PreReleaseVersionsGetInstance**: GET `/v1/prereleaseversions/{id}` +- **AppStoreConnect.Profiles** + - **ProfilesBundleIdGetToOneRelated**: GET `/v1/profiles/{id}/bundleid` + - **ProfilesCertificatesGetToManyRelated**: GET `/v1/profiles/{id}/certificates` + - **ProfilesCreateInstance**: POST `/v1/profiles` + - **ProfilesDeleteInstance**: DELETE `/v1/profiles/{id}` + - **ProfilesDevicesGetToManyRelated**: GET `/v1/profiles/{id}/devices` + - **ProfilesGetCollection**: GET `/v1/profiles` + - **ProfilesGetInstance**: GET `/v1/profiles/{id}` +- **AppStoreConnect.RoutingAppCoverages** + - **RoutingAppCoveragesCreateInstance**: POST `/v1/routingappcoverages` + - **RoutingAppCoveragesDeleteInstance**: DELETE `/v1/routingappcoverages/{id}` + - **RoutingAppCoveragesGetInstance**: GET `/v1/routingappcoverages/{id}` + - **RoutingAppCoveragesUpdateInstance**: PATCH `/v1/routingappcoverages/{id}` +- **AppStoreConnect.SalesReports** + - **SalesReportsGetCollection**: GET `/v1/salesreports` +- **AppStoreConnect.Territories** + - **TerritoriesGetCollection**: GET `/v1/territories` +- **AppStoreConnect.UserInvitations** + - **UserInvitationsCreateInstance**: POST `/v1/userinvitations` + - **UserInvitationsDeleteInstance**: DELETE `/v1/userinvitations/{id}` + - **UserInvitationsGetCollection**: GET `/v1/userinvitations` + - **UserInvitationsGetInstance**: GET `/v1/userinvitations/{id}` + - **UserInvitationsVisibleAppsGetToManyRelated**: GET `/v1/userinvitations/{id}/visibleapps` +- **AppStoreConnect.Users** + - **UsersDeleteInstance**: DELETE `/v1/users/{id}` + - **UsersGetCollection**: GET `/v1/users` + - **UsersGetInstance**: GET `/v1/users/{id}` + - **UsersUpdateInstance**: PATCH `/v1/users/{id}` + - **UsersVisibleAppsCreateToManyRelationship**: POST `/v1/users/{id}/relationships/visibleapps` + - **UsersVisibleAppsDeleteToManyRelationship**: DELETE `/v1/users/{id}/relationships/visibleapps` + - **UsersVisibleAppsGetToManyRelated**: GET `/v1/users/{id}/visibleapps` + - **UsersVisibleAppsGetToManyRelationship**: GET `/v1/users/{id}/relationships/visibleapps` + - **UsersVisibleAppsReplaceToManyRelationship**: PATCH `/v1/users/{id}/relationships/visibleapps` diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/API.swift b/Specs/AppStoreConnect/generated/Swift/Sources/API.swift new file mode 100644 index 000000000..27e7a73e3 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/API.swift @@ -0,0 +1,76 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public struct AppStoreConnect { + + /// Whether to discard any errors when decoding optional properties + public static var safeOptionalDecoding = false + + /// Whether to remove invalid elements instead of throwing when decoding arrays + public static var safeArrayDecoding = false + + /// Used to encode Dates when uses as string params + public static var dateEncodingFormatter = DateFormatter(formatString: "yyyy-MM-dd'T'HH:mm:ssZZZZZ", + locale: Locale(identifier: "en_US_POSIX"), + calendar: Calendar(identifier: .gregorian)) + + public static let version = "1.2" + + public enum AgeRatingDeclarations {} + public enum AppCategories {} + public enum AppEncryptionDeclarations {} + public enum AppInfoLocalizations {} + public enum AppInfos {} + public enum AppPreOrders {} + public enum AppPreviewSets {} + public enum AppPreviews {} + public enum AppPricePoints {} + public enum AppPriceTiers {} + public enum AppPrices {} + public enum AppScreenshotSets {} + public enum AppScreenshots {} + public enum AppStoreReviewAttachments {} + public enum AppStoreReviewDetails {} + public enum AppStoreVersionLocalizations {} + public enum AppStoreVersionPhasedReleases {} + public enum AppStoreVersionSubmissions {} + public enum AppStoreVersions {} + public enum Apps {} + public enum BetaAppLocalizations {} + public enum BetaAppReviewDetails {} + public enum BetaAppReviewSubmissions {} + public enum BetaBuildLocalizations {} + public enum BetaGroups {} + public enum BetaLicenseAgreements {} + public enum BetaTesterInvitations {} + public enum BetaTesters {} + public enum BuildBetaDetails {} + public enum BuildBetaNotifications {} + public enum Builds {} + public enum BundleIdCapabilities {} + public enum BundleIds {} + public enum Certificates {} + public enum Devices {} + public enum DiagnosticSignatures {} + public enum EndUserLicenseAgreements {} + public enum FinanceReports {} + public enum GameCenterEnabledVersions {} + public enum IdfaDeclarations {} + public enum InAppPurchases {} + public enum PreReleaseVersions {} + public enum Profiles {} + public enum RoutingAppCoverages {} + public enum SalesReports {} + public enum Territories {} + public enum UserInvitations {} + public enum Users {} + + public enum Server { + + public static let main = "https://api.appstoreconnect.apple.com/" + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/APIClient.swift b/Specs/AppStoreConnect/generated/Swift/Sources/APIClient.swift new file mode 100644 index 000000000..f29e1fda9 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/APIClient.swift @@ -0,0 +1,252 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation +import Alamofire + +/// Manages and sends APIRequests +public class APIClient { + + public static var `default` = APIClient(baseURL: AppStoreConnect.Server.main) + + /// A list of RequestBehaviours that can be used to monitor and alter all requests + public var behaviours: [RequestBehaviour] = [] + + /// The base url prepended before every request path + public var baseURL: String + + /// The Alamofire SessionManager used for each request + public var sessionManager: SessionManager + + /// These headers will get added to every request + public var defaultHeaders: [String: String] + + public var jsonDecoder = JSONDecoder() + public var jsonEncoder = JSONEncoder() + + public var decodingQueue = DispatchQueue(label: "apiClient", qos: .utility, attributes: .concurrent) + + public init(baseURL: String, sessionManager: SessionManager = .default, defaultHeaders: [String: String] = [:], behaviours: [RequestBehaviour] = []) { + self.baseURL = baseURL + self.sessionManager = sessionManager + self.behaviours = behaviours + self.defaultHeaders = defaultHeaders + jsonDecoder.dateDecodingStrategy = .custom(dateDecoder) + jsonEncoder.dateEncodingStrategy = .formatted(AppStoreConnect.dateEncodingFormatter) + } + + /// Makes a network request + /// + /// - Parameters: + /// - request: The API request to make + /// - behaviours: A list of behaviours that will be run for this request. Merged with APIClient.behaviours + /// - completionQueue: The queue that complete will be called on + /// - complete: A closure that gets passed the APIResponse + /// - Returns: A cancellable request. Not that cancellation will only work after any validation RequestBehaviours have run + @discardableResult + public func makeRequest(_ request: APIRequest, behaviours: [RequestBehaviour] = [], completionQueue: DispatchQueue = DispatchQueue.main, complete: @escaping (APIResponse) -> Void) -> CancellableRequest? { + // create composite behaviour to make it easy to call functions on array of behaviours + let requestBehaviour = RequestBehaviourGroup(request: request, behaviours: self.behaviours + behaviours) + + // create the url request from the request + var urlRequest: URLRequest + do { + urlRequest = try request.createURLRequest(baseURL: baseURL, encoder: jsonEncoder) + } catch { + let error = APIClientError.requestEncodingError(error) + requestBehaviour.onFailure(error: error) + let response = APIResponse(request: request, result: .failure(error)) + complete(response) + return nil + } + + // add the default headers + if urlRequest.allHTTPHeaderFields == nil { + urlRequest.allHTTPHeaderFields = [:] + } + for (key, value) in defaultHeaders { + urlRequest.allHTTPHeaderFields?[key] = value + } + + urlRequest = requestBehaviour.modifyRequest(urlRequest) + + let cancellableRequest = CancellableRequest(request: request.asAny()) + + requestBehaviour.validate(urlRequest) { result in + switch result { + case .success(let urlRequest): + self.makeNetworkRequest(request: request, urlRequest: urlRequest, cancellableRequest: cancellableRequest, requestBehaviour: requestBehaviour, completionQueue: completionQueue, complete: complete) + case .failure(let error): + let error = APIClientError.validationError(error) + let response = APIResponse(request: request, result: .failure(error), urlRequest: urlRequest) + requestBehaviour.onFailure(error: error) + complete(response) + } + } + return cancellableRequest + } + + private func makeNetworkRequest(request: APIRequest, urlRequest: URLRequest, cancellableRequest: CancellableRequest, requestBehaviour: RequestBehaviourGroup, completionQueue: DispatchQueue, complete: @escaping (APIResponse) -> Void) { + requestBehaviour.beforeSend() + + if request.service.isUpload { + sessionManager.upload( + multipartFormData: { multipartFormData in + for (name, value) in request.formParameters { + if let file = value as? UploadFile { + switch file.type { + case let .url(url): + if let fileName = file.fileName, let mimeType = file.mimeType { + multipartFormData.append(url, withName: name, fileName: fileName, mimeType: mimeType) + } else { + multipartFormData.append(url, withName: name) + } + case let .data(data): + if let fileName = file.fileName, let mimeType = file.mimeType { + multipartFormData.append(data, withName: name, fileName: fileName, mimeType: mimeType) + } else { + multipartFormData.append(data, withName: name) + } + } + } else if let url = value as? URL { + multipartFormData.append(url, withName: name) + } else if let data = value as? Data { + multipartFormData.append(data, withName: name) + } else if let string = value as? String { + multipartFormData.append(Data(string.utf8), withName: name) + } + } + }, + with: urlRequest, + encodingCompletion: { result in + switch result { + case .success(let uploadRequest, _, _): + cancellableRequest.networkRequest = uploadRequest + uploadRequest.responseData { dataResponse in + self.handleResponse(request: request, requestBehaviour: requestBehaviour, dataResponse: dataResponse, completionQueue: completionQueue, complete: complete) + } + case .failure(let error): + let apiError = APIClientError.requestEncodingError(error) + requestBehaviour.onFailure(error: apiError) + let response = APIResponse(request: request, result: .failure(apiError)) + + completionQueue.async { + complete(response) + } + } + }) + } else { + let networkRequest = sessionManager.request(urlRequest) + .responseData(queue: decodingQueue) { dataResponse in + self.handleResponse(request: request, requestBehaviour: requestBehaviour, dataResponse: dataResponse, completionQueue: completionQueue, complete: complete) + + } + cancellableRequest.networkRequest = networkRequest + } + } + + private func handleResponse(request: APIRequest, requestBehaviour: RequestBehaviourGroup, dataResponse: DataResponse, completionQueue: DispatchQueue, complete: @escaping (APIResponse) -> Void) { + + let result: APIResult + + switch dataResponse.result { + case .success(let value): + do { + let statusCode = dataResponse.response!.statusCode + let decoded = try T(statusCode: statusCode, data: value, decoder: jsonDecoder) + result = .success(decoded) + if decoded.successful { + requestBehaviour.onSuccess(result: decoded.response as Any) + } + } catch let error { + let apiError: APIClientError + if let error = error as? DecodingError { + apiError = APIClientError.decodingError(error) + } else if let error = error as? APIClientError { + apiError = error + } else { + apiError = APIClientError.unknownError(error) + } + + result = .failure(apiError) + requestBehaviour.onFailure(error: apiError) + } + case .failure(let error): + let apiError = APIClientError.networkError(error) + result = .failure(apiError) + requestBehaviour.onFailure(error: apiError) + } + let response = APIResponse(request: request, result: result, urlRequest: dataResponse.request, urlResponse: dataResponse.response, data: dataResponse.data, timeline: dataResponse.timeline) + requestBehaviour.onResponse(response: response.asAny()) + + completionQueue.async { + complete(response) + } + } +} + +public class CancellableRequest { + /// The request used to make the actual network request + public let request: AnyRequest + + init(request: AnyRequest) { + self.request = request + } + var networkRequest: Request? + + /// cancels the request + public func cancel() { + if let networkRequest = networkRequest { + networkRequest.cancel() + } + } +} + +// Helper extension for sending requests +extension APIRequest { + + /// makes a request using the default APIClient. Change your baseURL in APIClient.default.baseURL + public func makeRequest(complete: @escaping (APIResponse) -> Void) { + APIClient.default.makeRequest(self, complete: complete) + } +} + +// Create URLRequest +extension APIRequest { + + /// pass in an optional baseURL, otherwise URLRequest.url will be relative + public func createURLRequest(baseURL: String = "", encoder: RequestEncoder = JSONEncoder()) throws -> URLRequest { + let url = URL(string: "\(baseURL)\(path)")! + var urlRequest = URLRequest(url: url) + urlRequest.httpMethod = service.method + urlRequest.allHTTPHeaderFields = headers + + // filter out parameters with empty string value + var queryParams: [String: Any] = [:] + for (key, value) in queryParameters { + if String.init(describing: value) != "" { + queryParams[key] = value + } + } + if !queryParams.isEmpty { + urlRequest = try URLEncoding.queryString.encode(urlRequest, with: queryParams) + } + + var formParams: [String: Any] = [:] + for (key, value) in formParameters { + if String.init(describing: value) != "" { + formParams[key] = value + } + } + if !formParams.isEmpty { + urlRequest = try URLEncoding.httpBody.encode(urlRequest, with: formParams) + } + if let encodeBody = encodeBody { + urlRequest.httpBody = try encodeBody(encoder) + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + return urlRequest + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/APIClientError.swift b/Specs/AppStoreConnect/generated/Swift/Sources/APIClientError.swift new file mode 100644 index 000000000..82fb6db07 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/APIClientError.swift @@ -0,0 +1,40 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum APIClientError: Error { + case unexpectedStatusCode(statusCode: Int, data: Data) + case decodingError(DecodingError) + case requestEncodingError(Error) + case validationError(Error) + case networkError(Error) + case unknownError(Error) + + public var name:String { + switch self { + case .unexpectedStatusCode: return "Unexpected status code" + case .decodingError: return "Decoding error" + case .validationError: return "Request validation failed" + case .requestEncodingError: return "Request encoding failed" + case .networkError: return "Network error" + case .unknownError: return "Unknown error" + } + } +} + +extension APIClientError: CustomStringConvertible { + + public var description:String { + switch self { + case .unexpectedStatusCode(let statusCode, _): return "\(name): \(statusCode)" + case .decodingError(let error): return "\(name): \(error.localizedDescription)\n\(error)" + case .validationError(let error): return "\(name): \(error.localizedDescription)" + case .requestEncodingError(let error): return "\(name): \(error)" + case .networkError(let error): return "\(name): \(error.localizedDescription)" + case .unknownError(let error): return "\(name): \(error.localizedDescription)" + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/APIRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/APIRequest.swift new file mode 100644 index 000000000..e529d1cb0 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/APIRequest.swift @@ -0,0 +1,89 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class APIRequest { + + public let service: APIService + public private(set) var queryParameters: [String: Any] + public private(set) var formParameters: [String: Any] + public let encodeBody: ((RequestEncoder) throws -> Data)? + private(set) var headerParameters: [String: String] + public var customHeaders: [String: String] = [:] + + public var headers: [String: String] { + return headerParameters.merging(customHeaders) { param, custom in return custom } + } + + public var path: String { + return service.path + } + + public init(service: APIService, + queryParameters: [String: Any] = [:], + formParameters: [String: Any] = [:], + headers: [String: String] = [:], + encodeBody: ((RequestEncoder) throws -> Data)? = nil) { + self.service = service + self.queryParameters = queryParameters + self.formParameters = formParameters + self.headerParameters = headers + self.encodeBody = encodeBody + } +} + +extension APIRequest: CustomStringConvertible { + + public var description: String { + var string = "\(service.name): \(service.method) \(path)" + if !queryParameters.isEmpty { + string += "?" + queryParameters.map {"\($0)=\($1)"}.joined(separator: "&") + } + return string + } +} + +extension APIRequest: CustomDebugStringConvertible { + + public var debugDescription: String { + var string = description + if let encodeBody = encodeBody, + let data = try? encodeBody(JSONEncoder()), + let bodyString = String(data: data, encoding: .utf8) { + string += "\nbody: \(bodyString)" + } + return string + } +} + +/// A file upload +public struct UploadFile: Equatable { + + public let type: FileType + public let fileName: String? + public let mimeType: String? + + public init(type: FileType) { + self.type = type + self.fileName = nil + self.mimeType = nil + } + + public init(type: FileType, fileName: String, mimeType: String) { + self.type = type + self.fileName = fileName + self.mimeType = mimeType + } + + public enum FileType: Equatable { + case data(Data) + case url(URL) + } + + func encode() -> Any { + return self + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/APIResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/APIResponse.swift new file mode 100644 index 000000000..7514fd74c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/APIResponse.swift @@ -0,0 +1,101 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation +import Alamofire + +public protocol APIResponseValue: CustomDebugStringConvertible, CustomStringConvertible { + associatedtype SuccessType + var statusCode: Int { get } + var successful: Bool { get } + var response: Any { get } + init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws + var success: SuccessType? { get } +} + +public enum APIResponseResult: CustomStringConvertible, CustomDebugStringConvertible { + case success(SuccessType) + case failure(FailureType) + + public var value: Any { + switch self { + case .success(let value): return value + case .failure(let value): return value + } + } + + public var successful: Bool { + switch self { + case .success: return true + case .failure: return false + } + } + + public var description: String { + return "\(successful ? "success" : "failure")" + } + + public var debugDescription: String { + return "\(description):\n\(value)" + } +} + +public struct APIResponse { + + /// The APIRequest used for this response + public let request: APIRequest + + /// The result of the response . + public let result: APIResult + + /// The URL request sent to the server. + public let urlRequest: URLRequest? + + /// The server's response to the URL request. + public let urlResponse: HTTPURLResponse? + + /// The data returned by the server. + public let data: Data? + + /// The timeline of the complete lifecycle of the request. + public let timeline: Timeline? + + init(request: APIRequest, result: APIResult, urlRequest: URLRequest? = nil, urlResponse: HTTPURLResponse? = nil, data: Data? = nil, timeline: Timeline? = nil) { + self.request = request + self.result = result + self.urlRequest = urlRequest + self.urlResponse = urlResponse + self.data = data + self.timeline = timeline + } +} + +extension APIResponse: CustomStringConvertible, CustomDebugStringConvertible { + + public var description:String { + var string = "\(request)" + + switch result { + case .success(let value): + string += " returned \(value.statusCode)" + let responseString = "\(type(of: value.response))" + if responseString != "()" { + string += ": \(responseString)" + } + case .failure(let error): string += " failed: \(error)" + } + return string + } + + public var debugDescription: String { + var string = description + if let response = try? result.get().response { + if let debugStringConvertible = response as? CustomDebugStringConvertible { + string += "\n\(debugStringConvertible.debugDescription)" + } + } + return string + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/APIResult.swift b/Specs/AppStoreConnect/generated/Swift/Sources/APIResult.swift new file mode 100644 index 000000000..718c5ceb8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/APIResult.swift @@ -0,0 +1,6 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +public typealias APIResult = Result diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/APIService.swift b/Specs/AppStoreConnect/generated/Swift/Sources/APIService.swift new file mode 100644 index 000000000..4cf2264f2 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/APIService.swift @@ -0,0 +1,47 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +public struct APIService { + + public let id: String + public let tag: String + public let method: String + public let path: String + public let hasBody: Bool + public let isUpload: Bool + public let securityRequirements: [SecurityRequirement] + + public init(id: String, tag: String = "", method:String, path:String, hasBody: Bool, isUpload: Bool = false, securityRequirements: [SecurityRequirement] = []) { + self.id = id + self.tag = tag + self.method = method + self.path = path + self.hasBody = hasBody + self.isUpload = isUpload + self.securityRequirements = securityRequirements + } +} + +extension APIService: CustomStringConvertible { + + public var name: String { + return "\(tag.isEmpty ? "" : "\(tag).")\(id)" + } + + public var description: String { + return "\(name): \(method) \(path)" + } +} + +public struct SecurityRequirement { + public let type: String + public let scopes: [String] + + public init(type: String, scopes: [String]) { + self.type = type + self.scopes = scopes + } +} + diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/AnyCodable.swift b/Specs/AppStoreConnect/generated/Swift/Sources/AnyCodable.swift new file mode 100644 index 000000000..e263e9005 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/AnyCodable.swift @@ -0,0 +1,188 @@ +import Foundation + +public struct AnyCodable { + let value: Any + + init(_ value: T?) { + self.value = value ?? () + } +} + +extension AnyCodable: Codable { + + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + + if container.decodeNil() { + self.init(()) + } else if let bool = try? container.decode(Bool.self) { + self.init(bool) + } else if let int = try? container.decode(Int.self) { + self.init(int) + } else if let uint = try? container.decode(UInt.self) { + self.init(uint) + } else if let double = try? container.decode(Double.self) { + self.init(double) + } else if let string = try? container.decode(String.self) { + self.init(string) + } else if let array = try? container.decode([AnyCodable].self) { + self.init(array.map { $0.value }) + } else if let dictionary = try? container.decode([String: AnyCodable].self) { + self.init(dictionary.mapValues { $0.value }) + } else { + throw DecodingError.dataCorruptedError(in: container, debugDescription: "AnyCodable value cannot be decoded") + } + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + + switch self.value { + case is Void: + try container.encodeNil() + case let bool as Bool: + try container.encode(bool) + case let int as Int: + try container.encode(int) + case let int8 as Int8: + try container.encode(int8) + case let int16 as Int16: + try container.encode(int16) + case let int32 as Int32: + try container.encode(int32) + case let int64 as Int64: + try container.encode(int64) + case let uint as UInt: + try container.encode(uint) + case let uint8 as UInt8: + try container.encode(uint8) + case let uint16 as UInt16: + try container.encode(uint16) + case let uint32 as UInt32: + try container.encode(uint32) + case let uint64 as UInt64: + try container.encode(uint64) + case let float as Float: + try container.encode(float) + case let double as Double: + try container.encode(double) + case let string as String: + try container.encode(string) + case let date as Date: + try container.encode(date) + case let url as URL: + try container.encode(url) + case let array as [Any?]: + try container.encode(array.map { AnyCodable($0) }) + case let dictionary as [String: Any?]: + try container.encode(dictionary.mapValues { AnyCodable($0) }) + case let object as Encodable: + try object.encode(to: encoder) + default: + let context = EncodingError.Context(codingPath: container.codingPath, debugDescription: "AnyCodable value cannot be encoded") + throw EncodingError.invalidValue(self.value, context) + } + } +} + +extension AnyCodable: Equatable { + static public func ==(lhs: AnyCodable, rhs: AnyCodable) -> Bool { + switch (lhs.value, rhs.value) { + case is (Void, Void): + return true + case let (lhs as Bool, rhs as Bool): + return lhs == rhs + case let (lhs as Int, rhs as Int): + return lhs == rhs + case let (lhs as Int8, rhs as Int8): + return lhs == rhs + case let (lhs as Int16, rhs as Int16): + return lhs == rhs + case let (lhs as Int32, rhs as Int32): + return lhs == rhs + case let (lhs as Int64, rhs as Int64): + return lhs == rhs + case let (lhs as UInt, rhs as UInt): + return lhs == rhs + case let (lhs as UInt8, rhs as UInt8): + return lhs == rhs + case let (lhs as UInt16, rhs as UInt16): + return lhs == rhs + case let (lhs as UInt32, rhs as UInt32): + return lhs == rhs + case let (lhs as UInt64, rhs as UInt64): + return lhs == rhs + case let (lhs as Float, rhs as Float): + return lhs == rhs + case let (lhs as Double, rhs as Double): + return lhs == rhs + case let (lhs as String, rhs as String): + return lhs == rhs + case (let lhs as [String: AnyCodable], let rhs as [String: AnyCodable]): + return lhs == rhs + case (let lhs as [AnyCodable], let rhs as [AnyCodable]): + return lhs == rhs + default: + return false + } + } +} + +extension AnyCodable: CustomStringConvertible { + public var description: String { + switch value { + case is Void: + return String(describing: nil as Any?) + case let value as CustomStringConvertible: + return value.description + default: + return String(describing: value) + } + } +} + +extension AnyCodable: CustomDebugStringConvertible { + public var debugDescription: String { + switch value { + case let value as CustomDebugStringConvertible: + return "AnyCodable(\(value.debugDescription))" + default: + return "AnyCodable(\(self.description))" + } + } +} + +extension AnyCodable: ExpressibleByNilLiteral, ExpressibleByBooleanLiteral, ExpressibleByIntegerLiteral, ExpressibleByFloatLiteral, ExpressibleByStringLiteral, ExpressibleByArrayLiteral, ExpressibleByDictionaryLiteral { + + public init(nilLiteral: ()) { + self.init(nil as Any?) + } + + public init(booleanLiteral value: Bool) { + self.init(value) + } + + public init(integerLiteral value: Int) { + self.init(value) + } + + public init(floatLiteral value: Double) { + self.init(value) + } + + public init(extendedGraphemeClusterLiteral value: String) { + self.init(value) + } + + public init(stringLiteral value: String) { + self.init(value) + } + + public init(arrayLiteral elements: Any...) { + self.init(elements) + } + + public init(dictionaryLiteral elements: (AnyHashable, Any)...) { + self.init(Dictionary(elements, uniquingKeysWith: { (first, _) in first })) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Coding.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Coding.swift new file mode 100644 index 000000000..5069fff24 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Coding.swift @@ -0,0 +1,367 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public protocol APIModel: Codable, Equatable { } + +public typealias DateTime = Date +public typealias File = Data +public typealias ID = UUID + +public protocol ResponseDecoder { + + func decode(_ type: T.Type, from: Data) throws -> T +} + +extension JSONDecoder: ResponseDecoder {} + +public protocol RequestEncoder { + + func encode(_ value: T) throws -> Data +} + +extension JSONEncoder: RequestEncoder {} + +extension APIModel { + func encode() -> [String: Any] { + guard + let jsonData = try? JSONEncoder().encode(self), + let jsonValue = try? JSONSerialization.jsonObject(with: jsonData), + let jsonDictionary = jsonValue as? [String: Any] else { + return [:] + } + return jsonDictionary + } +} + +struct StringCodingKey: CodingKey, ExpressibleByStringLiteral { + + private let string: String + private let int: Int? + + var stringValue: String { return string } + + init(string: String) { + self.string = string + int = nil + } + init?(stringValue: String) { + string = stringValue + int = nil + } + + var intValue: Int? { return int } + init?(intValue: Int) { + string = String(describing: intValue) + int = intValue + } + + init(stringLiteral value: String) { + string = value + int = nil + } +} + +// any json decoding +extension ResponseDecoder { + + func decodeAny(_ type: T.Type, from data: Data) throws -> T { + guard let decoded = try decode(AnyCodable.self, from: data) as? T else { + throw DecodingError.typeMismatch(T.self, DecodingError.Context(codingPath: [StringCodingKey(string: "")], debugDescription: "Decoding of \(T.self) failed")) + } + return decoded + } +} + +// any decoding +extension KeyedDecodingContainer { + + func decodeAny(_ type: T.Type, forKey key: K) throws -> T { + guard let value = try decode(AnyCodable.self, forKey: key).value as? T else { + throw DecodingError.typeMismatch(T.self, DecodingError.Context(codingPath: codingPath, debugDescription: "Decoding of \(T.self) failed")) + } + return value + } + + func decodeAnyIfPresent(_ type: T.Type, forKey key: K) throws -> T? { + return try decodeOptional { + guard let value = try decodeIfPresent(AnyCodable.self, forKey: key)?.value else { return nil } + if let typedValue = value as? T { + return typedValue + } else { + throw DecodingError.typeMismatch(T.self, DecodingError.Context(codingPath: codingPath, debugDescription: "Decoding of \(T.self) failed")) + } + } + } + + func toDictionary() throws -> [String: Any] { + var dictionary: [String: Any] = [:] + for key in allKeys { + dictionary[key.stringValue] = try decodeAny(key) + } + return dictionary + } + + func decode(_ key: KeyedDecodingContainer.Key) throws -> T where T: Decodable { + return try decode(T.self, forKey: key) + } + + func decodeIfPresent(_ key: KeyedDecodingContainer.Key) throws -> T? where T: Decodable { + return try decodeOptional { + try decodeIfPresent(T.self, forKey: key) + } + } + + func decodeAny(_ key: K) throws -> T { + return try decodeAny(T.self, forKey: key) + } + + func decodeAnyIfPresent(_ key: K) throws -> T? { + return try decodeAnyIfPresent(T.self, forKey: key) + } + + public func decodeArray(_ key: K) throws -> [T] { + var container: UnkeyedDecodingContainer + var array: [T] = [] + + do { + container = try nestedUnkeyedContainer(forKey: key) + } catch { + if AppStoreConnect.safeArrayDecoding { + return array + } else { + throw error + } + } + + while !container.isAtEnd { + do { + let element = try container.decode(T.self) + array.append(element) + } catch { + if AppStoreConnect.safeArrayDecoding { + // hack to advance the current index + _ = try? container.decode(AnyCodable.self) + } else { + throw error + } + } + } + return array + } + + public func decodeArrayIfPresent(_ key: K) throws -> [T]? { + return try decodeOptional { + if contains(key) { + return try decodeArray(key) + } else { + return nil + } + } + } + + fileprivate func decodeOptional(_ closure: () throws -> T? ) throws -> T? { + if AppStoreConnect.safeOptionalDecoding { + do { + return try closure() + } catch { + return nil + } + } else { + return try closure() + } + } +} + +// any encoding +extension KeyedEncodingContainer { + + mutating func encodeAnyIfPresent(_ value: T?, forKey key: K) throws { + guard let value = value else { return } + try encodeIfPresent(AnyCodable(value), forKey: key) + } + + mutating func encodeAny(_ value: T, forKey key: K) throws { + try encode(AnyCodable(value), forKey: key) + } +} + +// Date structs for date and date-time formats + +extension DateFormatter { + + convenience init(formatString: String, locale: Locale? = nil, timeZone: TimeZone? = nil, calendar: Calendar? = nil) { + self.init() + dateFormat = formatString + if let locale = locale { + self.locale = locale + } + if let timeZone = timeZone { + self.timeZone = timeZone + } + if let calendar = calendar { + self.calendar = calendar + } + } + + convenience init(dateStyle: DateFormatter.Style, timeStyle: DateFormatter.Style) { + self.init() + self.dateStyle = dateStyle + self.timeStyle = timeStyle + } +} + +let dateDecoder: (Decoder) throws -> Date = { decoder in + let container = try decoder.singleValueContainer() + let string = try container.decode(String.self) + + let formatterWithMilliseconds = DateFormatter() + formatterWithMilliseconds.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + formatterWithMilliseconds.locale = Locale(identifier: "en_US_POSIX") + formatterWithMilliseconds.timeZone = TimeZone(identifier: "UTC") + formatterWithMilliseconds.calendar = Calendar(identifier: .gregorian) + + let formatterWithoutMilliseconds = DateFormatter() + formatterWithoutMilliseconds.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + formatterWithoutMilliseconds.locale = Locale(identifier: "en_US_POSIX") + formatterWithoutMilliseconds.timeZone = TimeZone(identifier: "UTC") + formatterWithoutMilliseconds.calendar = Calendar(identifier: .gregorian) + + guard let date = formatterWithMilliseconds.date(from: string) ?? + formatterWithoutMilliseconds.date(from: string) else { + throw DecodingError.dataCorruptedError(in: container, debugDescription: "Could not decode date") + } + return date + } + +public struct DateDay: Codable, Comparable { + + /// The date formatter used for encoding and decoding + public static let dateFormatter: DateFormatter = { + let formatter = DateFormatter() + formatter.dateFormat = "yyyy-MM-dd" + formatter.calendar = .current + return formatter + }() + + public let date: Date + public let year: Int + public let month: Int + public let day: Int + + public init(date: Date = Date()) { + self.date = date + let dateComponents = Calendar.current.dateComponents([.day, .month, .year], from: date) + guard let year = dateComponents.year, + let month = dateComponents.month, + let day = dateComponents.day else { + fatalError("Date does not contain correct components") + } + self.year = year + self.month = month + self.day = day + } + + public init(year: Int, month: Int, day: Int) { + let dateComponents = DateComponents(calendar: .current, year: year, month: month, day: day) + guard let date = dateComponents.date else { + fatalError("Could not create date in current calendar") + } + self.date = date + self.year = year + self.month = month + self.day = day + } + + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + let string = try container.decode(String.self) + guard let date = DateDay.dateFormatter.date(from: string) else { + throw DecodingError.dataCorruptedError(in: container, debugDescription: "Date not in correct format of \(DateDay.dateFormatter.dateFormat ?? "")") + } + self.init(date: date) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.singleValueContainer() + let string = DateDay.dateFormatter.string(from: date) + try container.encode(string) + } + + public static func == (lhs: DateDay, rhs: DateDay) -> Bool { + return lhs.year == rhs.year && + lhs.month == rhs.month && + lhs.day == rhs.day + } + + public static func < (lhs: DateDay, rhs: DateDay) -> Bool { + return lhs.date < rhs.date + } +} + +extension DateFormatter { + + public func string(from dateDay: DateDay) -> String { + return string(from: dateDay.date) + } +} + +// for parameter encoding + +extension DateDay { + func encode() -> Any { + return DateDay.dateFormatter.string(from: date) + } +} + +extension Date { + func encode() -> Any { + return AppStoreConnect.dateEncodingFormatter.string(from: self) + } +} + +extension URL { + func encode() -> Any { + return absoluteString + } +} + +extension RawRepresentable { + func encode() -> Any { + return rawValue + } +} + +extension Array where Element: RawRepresentable { + func encode() -> [Any] { + return map { $0.rawValue } + } +} + +extension Dictionary where Key == String, Value: RawRepresentable { + func encode() -> [String: Any] { + return mapValues { $0.rawValue } + } +} + +extension UUID { + func encode() -> Any { + return uuidString + } +} + +extension String { + func encode() -> Any { + return self + } +} + +extension Data { + + func encode() -> Any { + return self + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AgeRatingDeclaration.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AgeRatingDeclaration.swift new file mode 100644 index 000000000..7da5e2f2c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AgeRatingDeclaration.swift @@ -0,0 +1,234 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AgeRatingDeclaration: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case ageRatingDeclarations = "ageRatingDeclarations" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public enum AlcoholTobaccoOrDrugUseOrReferences: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum GamblingSimulated: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum HorrorOrFearThemes: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum MatureOrSuggestiveThemes: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum MedicalOrTreatmentInformation: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum ProfanityOrCrudeHumor: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum SexualContentGraphicAndNudity: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum SexualContentOrNudity: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum ViolenceCartoonOrFantasy: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum ViolenceRealistic: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum ViolenceRealisticProlongedGraphicOrSadistic: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public var alcoholTobaccoOrDrugUseOrReferences: AlcoholTobaccoOrDrugUseOrReferences? + + public var gamblingAndContests: Bool? + + public var gamblingSimulated: GamblingSimulated? + + public var horrorOrFearThemes: HorrorOrFearThemes? + + public var kidsAgeBand: KidsAgeBand? + + public var matureOrSuggestiveThemes: MatureOrSuggestiveThemes? + + public var medicalOrTreatmentInformation: MedicalOrTreatmentInformation? + + public var profanityOrCrudeHumor: ProfanityOrCrudeHumor? + + public var sexualContentGraphicAndNudity: SexualContentGraphicAndNudity? + + public var sexualContentOrNudity: SexualContentOrNudity? + + public var unrestrictedWebAccess: Bool? + + public var violenceCartoonOrFantasy: ViolenceCartoonOrFantasy? + + public var violenceRealistic: ViolenceRealistic? + + public var violenceRealisticProlongedGraphicOrSadistic: ViolenceRealisticProlongedGraphicOrSadistic? + + public init(alcoholTobaccoOrDrugUseOrReferences: AlcoholTobaccoOrDrugUseOrReferences? = nil, gamblingAndContests: Bool? = nil, gamblingSimulated: GamblingSimulated? = nil, horrorOrFearThemes: HorrorOrFearThemes? = nil, kidsAgeBand: KidsAgeBand? = nil, matureOrSuggestiveThemes: MatureOrSuggestiveThemes? = nil, medicalOrTreatmentInformation: MedicalOrTreatmentInformation? = nil, profanityOrCrudeHumor: ProfanityOrCrudeHumor? = nil, sexualContentGraphicAndNudity: SexualContentGraphicAndNudity? = nil, sexualContentOrNudity: SexualContentOrNudity? = nil, unrestrictedWebAccess: Bool? = nil, violenceCartoonOrFantasy: ViolenceCartoonOrFantasy? = nil, violenceRealistic: ViolenceRealistic? = nil, violenceRealisticProlongedGraphicOrSadistic: ViolenceRealisticProlongedGraphicOrSadistic? = nil) { + self.alcoholTobaccoOrDrugUseOrReferences = alcoholTobaccoOrDrugUseOrReferences + self.gamblingAndContests = gamblingAndContests + self.gamblingSimulated = gamblingSimulated + self.horrorOrFearThemes = horrorOrFearThemes + self.kidsAgeBand = kidsAgeBand + self.matureOrSuggestiveThemes = matureOrSuggestiveThemes + self.medicalOrTreatmentInformation = medicalOrTreatmentInformation + self.profanityOrCrudeHumor = profanityOrCrudeHumor + self.sexualContentGraphicAndNudity = sexualContentGraphicAndNudity + self.sexualContentOrNudity = sexualContentOrNudity + self.unrestrictedWebAccess = unrestrictedWebAccess + self.violenceCartoonOrFantasy = violenceCartoonOrFantasy + self.violenceRealistic = violenceRealistic + self.violenceRealisticProlongedGraphicOrSadistic = violenceRealisticProlongedGraphicOrSadistic + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + alcoholTobaccoOrDrugUseOrReferences = try container.decodeIfPresent("alcoholTobaccoOrDrugUseOrReferences") + gamblingAndContests = try container.decodeIfPresent("gamblingAndContests") + gamblingSimulated = try container.decodeIfPresent("gamblingSimulated") + horrorOrFearThemes = try container.decodeIfPresent("horrorOrFearThemes") + kidsAgeBand = try container.decodeIfPresent("kidsAgeBand") + matureOrSuggestiveThemes = try container.decodeIfPresent("matureOrSuggestiveThemes") + medicalOrTreatmentInformation = try container.decodeIfPresent("medicalOrTreatmentInformation") + profanityOrCrudeHumor = try container.decodeIfPresent("profanityOrCrudeHumor") + sexualContentGraphicAndNudity = try container.decodeIfPresent("sexualContentGraphicAndNudity") + sexualContentOrNudity = try container.decodeIfPresent("sexualContentOrNudity") + unrestrictedWebAccess = try container.decodeIfPresent("unrestrictedWebAccess") + violenceCartoonOrFantasy = try container.decodeIfPresent("violenceCartoonOrFantasy") + violenceRealistic = try container.decodeIfPresent("violenceRealistic") + violenceRealisticProlongedGraphicOrSadistic = try container.decodeIfPresent("violenceRealisticProlongedGraphicOrSadistic") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(alcoholTobaccoOrDrugUseOrReferences, forKey: "alcoholTobaccoOrDrugUseOrReferences") + try container.encodeIfPresent(gamblingAndContests, forKey: "gamblingAndContests") + try container.encodeIfPresent(gamblingSimulated, forKey: "gamblingSimulated") + try container.encodeIfPresent(horrorOrFearThemes, forKey: "horrorOrFearThemes") + try container.encodeIfPresent(kidsAgeBand, forKey: "kidsAgeBand") + try container.encodeIfPresent(matureOrSuggestiveThemes, forKey: "matureOrSuggestiveThemes") + try container.encodeIfPresent(medicalOrTreatmentInformation, forKey: "medicalOrTreatmentInformation") + try container.encodeIfPresent(profanityOrCrudeHumor, forKey: "profanityOrCrudeHumor") + try container.encodeIfPresent(sexualContentGraphicAndNudity, forKey: "sexualContentGraphicAndNudity") + try container.encodeIfPresent(sexualContentOrNudity, forKey: "sexualContentOrNudity") + try container.encodeIfPresent(unrestrictedWebAccess, forKey: "unrestrictedWebAccess") + try container.encodeIfPresent(violenceCartoonOrFantasy, forKey: "violenceCartoonOrFantasy") + try container.encodeIfPresent(violenceRealistic, forKey: "violenceRealistic") + try container.encodeIfPresent(violenceRealisticProlongedGraphicOrSadistic, forKey: "violenceRealisticProlongedGraphicOrSadistic") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.alcoholTobaccoOrDrugUseOrReferences == object.alcoholTobaccoOrDrugUseOrReferences else { return false } + guard self.gamblingAndContests == object.gamblingAndContests else { return false } + guard self.gamblingSimulated == object.gamblingSimulated else { return false } + guard self.horrorOrFearThemes == object.horrorOrFearThemes else { return false } + guard self.kidsAgeBand == object.kidsAgeBand else { return false } + guard self.matureOrSuggestiveThemes == object.matureOrSuggestiveThemes else { return false } + guard self.medicalOrTreatmentInformation == object.medicalOrTreatmentInformation else { return false } + guard self.profanityOrCrudeHumor == object.profanityOrCrudeHumor else { return false } + guard self.sexualContentGraphicAndNudity == object.sexualContentGraphicAndNudity else { return false } + guard self.sexualContentOrNudity == object.sexualContentOrNudity else { return false } + guard self.unrestrictedWebAccess == object.unrestrictedWebAccess else { return false } + guard self.violenceCartoonOrFantasy == object.violenceCartoonOrFantasy else { return false } + guard self.violenceRealistic == object.violenceRealistic else { return false } + guard self.violenceRealisticProlongedGraphicOrSadistic == object.violenceRealisticProlongedGraphicOrSadistic else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AgeRatingDeclaration else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: AgeRatingDeclaration, rhs: AgeRatingDeclaration) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AgeRatingDeclarationResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AgeRatingDeclarationResponse.swift new file mode 100644 index 000000000..d0cf1befa --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AgeRatingDeclarationResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AgeRatingDeclarationResponse: APIModel { + + public var data: AgeRatingDeclaration + + public var links: DocumentLinks + + public init(data: AgeRatingDeclaration, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AgeRatingDeclarationResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AgeRatingDeclarationResponse, rhs: AgeRatingDeclarationResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AgeRatingDeclarationUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AgeRatingDeclarationUpdateRequest.swift new file mode 100644 index 000000000..aa6b20e2b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AgeRatingDeclarationUpdateRequest.swift @@ -0,0 +1,259 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AgeRatingDeclarationUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case ageRatingDeclarations = "ageRatingDeclarations" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public enum AlcoholTobaccoOrDrugUseOrReferences: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum GamblingSimulated: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum HorrorOrFearThemes: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum MatureOrSuggestiveThemes: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum MedicalOrTreatmentInformation: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum ProfanityOrCrudeHumor: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum SexualContentGraphicAndNudity: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum SexualContentOrNudity: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum ViolenceCartoonOrFantasy: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum ViolenceRealistic: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public enum ViolenceRealisticProlongedGraphicOrSadistic: String, Codable, Equatable, CaseIterable { + case none = "NONE" + case infrequentOrMild = "INFREQUENT_OR_MILD" + case frequentOrIntense = "FREQUENT_OR_INTENSE" + } + + public var alcoholTobaccoOrDrugUseOrReferences: AlcoholTobaccoOrDrugUseOrReferences? + + public var gamblingAndContests: Bool? + + public var gamblingSimulated: GamblingSimulated? + + public var horrorOrFearThemes: HorrorOrFearThemes? + + public var kidsAgeBand: KidsAgeBand? + + public var matureOrSuggestiveThemes: MatureOrSuggestiveThemes? + + public var medicalOrTreatmentInformation: MedicalOrTreatmentInformation? + + public var profanityOrCrudeHumor: ProfanityOrCrudeHumor? + + public var sexualContentGraphicAndNudity: SexualContentGraphicAndNudity? + + public var sexualContentOrNudity: SexualContentOrNudity? + + public var unrestrictedWebAccess: Bool? + + public var violenceCartoonOrFantasy: ViolenceCartoonOrFantasy? + + public var violenceRealistic: ViolenceRealistic? + + public var violenceRealisticProlongedGraphicOrSadistic: ViolenceRealisticProlongedGraphicOrSadistic? + + public init(alcoholTobaccoOrDrugUseOrReferences: AlcoholTobaccoOrDrugUseOrReferences? = nil, gamblingAndContests: Bool? = nil, gamblingSimulated: GamblingSimulated? = nil, horrorOrFearThemes: HorrorOrFearThemes? = nil, kidsAgeBand: KidsAgeBand? = nil, matureOrSuggestiveThemes: MatureOrSuggestiveThemes? = nil, medicalOrTreatmentInformation: MedicalOrTreatmentInformation? = nil, profanityOrCrudeHumor: ProfanityOrCrudeHumor? = nil, sexualContentGraphicAndNudity: SexualContentGraphicAndNudity? = nil, sexualContentOrNudity: SexualContentOrNudity? = nil, unrestrictedWebAccess: Bool? = nil, violenceCartoonOrFantasy: ViolenceCartoonOrFantasy? = nil, violenceRealistic: ViolenceRealistic? = nil, violenceRealisticProlongedGraphicOrSadistic: ViolenceRealisticProlongedGraphicOrSadistic? = nil) { + self.alcoholTobaccoOrDrugUseOrReferences = alcoholTobaccoOrDrugUseOrReferences + self.gamblingAndContests = gamblingAndContests + self.gamblingSimulated = gamblingSimulated + self.horrorOrFearThemes = horrorOrFearThemes + self.kidsAgeBand = kidsAgeBand + self.matureOrSuggestiveThemes = matureOrSuggestiveThemes + self.medicalOrTreatmentInformation = medicalOrTreatmentInformation + self.profanityOrCrudeHumor = profanityOrCrudeHumor + self.sexualContentGraphicAndNudity = sexualContentGraphicAndNudity + self.sexualContentOrNudity = sexualContentOrNudity + self.unrestrictedWebAccess = unrestrictedWebAccess + self.violenceCartoonOrFantasy = violenceCartoonOrFantasy + self.violenceRealistic = violenceRealistic + self.violenceRealisticProlongedGraphicOrSadistic = violenceRealisticProlongedGraphicOrSadistic + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + alcoholTobaccoOrDrugUseOrReferences = try container.decodeIfPresent("alcoholTobaccoOrDrugUseOrReferences") + gamblingAndContests = try container.decodeIfPresent("gamblingAndContests") + gamblingSimulated = try container.decodeIfPresent("gamblingSimulated") + horrorOrFearThemes = try container.decodeIfPresent("horrorOrFearThemes") + kidsAgeBand = try container.decodeIfPresent("kidsAgeBand") + matureOrSuggestiveThemes = try container.decodeIfPresent("matureOrSuggestiveThemes") + medicalOrTreatmentInformation = try container.decodeIfPresent("medicalOrTreatmentInformation") + profanityOrCrudeHumor = try container.decodeIfPresent("profanityOrCrudeHumor") + sexualContentGraphicAndNudity = try container.decodeIfPresent("sexualContentGraphicAndNudity") + sexualContentOrNudity = try container.decodeIfPresent("sexualContentOrNudity") + unrestrictedWebAccess = try container.decodeIfPresent("unrestrictedWebAccess") + violenceCartoonOrFantasy = try container.decodeIfPresent("violenceCartoonOrFantasy") + violenceRealistic = try container.decodeIfPresent("violenceRealistic") + violenceRealisticProlongedGraphicOrSadistic = try container.decodeIfPresent("violenceRealisticProlongedGraphicOrSadistic") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(alcoholTobaccoOrDrugUseOrReferences, forKey: "alcoholTobaccoOrDrugUseOrReferences") + try container.encodeIfPresent(gamblingAndContests, forKey: "gamblingAndContests") + try container.encodeIfPresent(gamblingSimulated, forKey: "gamblingSimulated") + try container.encodeIfPresent(horrorOrFearThemes, forKey: "horrorOrFearThemes") + try container.encodeIfPresent(kidsAgeBand, forKey: "kidsAgeBand") + try container.encodeIfPresent(matureOrSuggestiveThemes, forKey: "matureOrSuggestiveThemes") + try container.encodeIfPresent(medicalOrTreatmentInformation, forKey: "medicalOrTreatmentInformation") + try container.encodeIfPresent(profanityOrCrudeHumor, forKey: "profanityOrCrudeHumor") + try container.encodeIfPresent(sexualContentGraphicAndNudity, forKey: "sexualContentGraphicAndNudity") + try container.encodeIfPresent(sexualContentOrNudity, forKey: "sexualContentOrNudity") + try container.encodeIfPresent(unrestrictedWebAccess, forKey: "unrestrictedWebAccess") + try container.encodeIfPresent(violenceCartoonOrFantasy, forKey: "violenceCartoonOrFantasy") + try container.encodeIfPresent(violenceRealistic, forKey: "violenceRealistic") + try container.encodeIfPresent(violenceRealisticProlongedGraphicOrSadistic, forKey: "violenceRealisticProlongedGraphicOrSadistic") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.alcoholTobaccoOrDrugUseOrReferences == object.alcoholTobaccoOrDrugUseOrReferences else { return false } + guard self.gamblingAndContests == object.gamblingAndContests else { return false } + guard self.gamblingSimulated == object.gamblingSimulated else { return false } + guard self.horrorOrFearThemes == object.horrorOrFearThemes else { return false } + guard self.kidsAgeBand == object.kidsAgeBand else { return false } + guard self.matureOrSuggestiveThemes == object.matureOrSuggestiveThemes else { return false } + guard self.medicalOrTreatmentInformation == object.medicalOrTreatmentInformation else { return false } + guard self.profanityOrCrudeHumor == object.profanityOrCrudeHumor else { return false } + guard self.sexualContentGraphicAndNudity == object.sexualContentGraphicAndNudity else { return false } + guard self.sexualContentOrNudity == object.sexualContentOrNudity else { return false } + guard self.unrestrictedWebAccess == object.unrestrictedWebAccess else { return false } + guard self.violenceCartoonOrFantasy == object.violenceCartoonOrFantasy else { return false } + guard self.violenceRealistic == object.violenceRealistic else { return false } + guard self.violenceRealisticProlongedGraphicOrSadistic == object.violenceRealisticProlongedGraphicOrSadistic else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AgeRatingDeclarationUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AgeRatingDeclarationUpdateRequest, rhs: AgeRatingDeclarationUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/App.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/App.swift new file mode 100644 index 000000000..cc1a84ec1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/App.swift @@ -0,0 +1,1916 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class App: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public enum ContentRightsDeclaration: String, Codable, Equatable, CaseIterable { + case doesNotUseThirdPartyContent = "DOES_NOT_USE_THIRD_PARTY_CONTENT" + case usesThirdPartyContent = "USES_THIRD_PARTY_CONTENT" + } + + public var availableInNewTerritories: Bool? + + public var bundleId: String? + + public var contentRightsDeclaration: ContentRightsDeclaration? + + public var isOrEverWasMadeForKids: Bool? + + public var name: String? + + public var primaryLocale: String? + + public var sku: String? + + public init(availableInNewTerritories: Bool? = nil, bundleId: String? = nil, contentRightsDeclaration: ContentRightsDeclaration? = nil, isOrEverWasMadeForKids: Bool? = nil, name: String? = nil, primaryLocale: String? = nil, sku: String? = nil) { + self.availableInNewTerritories = availableInNewTerritories + self.bundleId = bundleId + self.contentRightsDeclaration = contentRightsDeclaration + self.isOrEverWasMadeForKids = isOrEverWasMadeForKids + self.name = name + self.primaryLocale = primaryLocale + self.sku = sku + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + availableInNewTerritories = try container.decodeIfPresent("availableInNewTerritories") + bundleId = try container.decodeIfPresent("bundleId") + contentRightsDeclaration = try container.decodeIfPresent("contentRightsDeclaration") + isOrEverWasMadeForKids = try container.decodeIfPresent("isOrEverWasMadeForKids") + name = try container.decodeIfPresent("name") + primaryLocale = try container.decodeIfPresent("primaryLocale") + sku = try container.decodeIfPresent("sku") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(availableInNewTerritories, forKey: "availableInNewTerritories") + try container.encodeIfPresent(bundleId, forKey: "bundleId") + try container.encodeIfPresent(contentRightsDeclaration, forKey: "contentRightsDeclaration") + try container.encodeIfPresent(isOrEverWasMadeForKids, forKey: "isOrEverWasMadeForKids") + try container.encodeIfPresent(name, forKey: "name") + try container.encodeIfPresent(primaryLocale, forKey: "primaryLocale") + try container.encodeIfPresent(sku, forKey: "sku") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.availableInNewTerritories == object.availableInNewTerritories else { return false } + guard self.bundleId == object.bundleId else { return false } + guard self.contentRightsDeclaration == object.contentRightsDeclaration else { return false } + guard self.isOrEverWasMadeForKids == object.isOrEverWasMadeForKids else { return false } + guard self.name == object.name else { return false } + guard self.primaryLocale == object.primaryLocale else { return false } + guard self.sku == object.sku else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var appInfos: AppInfos? + + public var appStoreVersions: AppStoreVersions? + + public var availableTerritories: AvailableTerritories? + + public var betaAppLocalizations: BetaAppLocalizations? + + public var betaAppReviewDetail: BetaAppReviewDetail? + + public var betaGroups: BetaGroups? + + public var betaLicenseAgreement: BetaLicenseAgreement? + + public var builds: Builds? + + public var endUserLicenseAgreement: EndUserLicenseAgreement? + + public var gameCenterEnabledVersions: GameCenterEnabledVersions? + + public var inAppPurchases: InAppPurchases? + + public var preOrder: PreOrder? + + public var preReleaseVersions: PreReleaseVersions? + + public var prices: Prices? + + public class AppInfos: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppInfos else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppInfos, rhs: AppInfos) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class AppStoreVersions: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersions else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppStoreVersions, rhs: AppStoreVersions) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class AvailableTerritories: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case territories = "territories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AvailableTerritories else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AvailableTerritories, rhs: AvailableTerritories) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class BetaAppLocalizations: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaAppLocalizations = "betaAppLocalizations" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppLocalizations else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaAppLocalizations, rhs: BetaAppLocalizations) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class BetaAppReviewDetail: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaAppReviewDetails = "betaAppReviewDetails" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppReviewDetail else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: BetaAppReviewDetail, rhs: BetaAppReviewDetail) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class BetaGroups: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaGroups = "betaGroups" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaGroups else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaGroups, rhs: BetaGroups) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class BetaLicenseAgreement: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaLicenseAgreements = "betaLicenseAgreements" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaLicenseAgreement else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: BetaLicenseAgreement, rhs: BetaLicenseAgreement) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Builds: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Builds else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: Builds, rhs: Builds) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class EndUserLicenseAgreement: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case endUserLicenseAgreements = "endUserLicenseAgreements" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? EndUserLicenseAgreement else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: EndUserLicenseAgreement, rhs: EndUserLicenseAgreement) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class GameCenterEnabledVersions: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? GameCenterEnabledVersions else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: GameCenterEnabledVersions, rhs: GameCenterEnabledVersions) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class InAppPurchases: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case inAppPurchases = "inAppPurchases" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? InAppPurchases else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: InAppPurchases, rhs: InAppPurchases) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class PreOrder: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreOrders = "appPreOrders" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PreOrder else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: PreOrder, rhs: PreOrder) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class PreReleaseVersions: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case preReleaseVersions = "preReleaseVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PreReleaseVersions else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: PreReleaseVersions, rhs: PreReleaseVersions) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Prices: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPrices = "appPrices" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Prices else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: Prices, rhs: Prices) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appInfos: AppInfos? = nil, appStoreVersions: AppStoreVersions? = nil, availableTerritories: AvailableTerritories? = nil, betaAppLocalizations: BetaAppLocalizations? = nil, betaAppReviewDetail: BetaAppReviewDetail? = nil, betaGroups: BetaGroups? = nil, betaLicenseAgreement: BetaLicenseAgreement? = nil, builds: Builds? = nil, endUserLicenseAgreement: EndUserLicenseAgreement? = nil, gameCenterEnabledVersions: GameCenterEnabledVersions? = nil, inAppPurchases: InAppPurchases? = nil, preOrder: PreOrder? = nil, preReleaseVersions: PreReleaseVersions? = nil, prices: Prices? = nil) { + self.appInfos = appInfos + self.appStoreVersions = appStoreVersions + self.availableTerritories = availableTerritories + self.betaAppLocalizations = betaAppLocalizations + self.betaAppReviewDetail = betaAppReviewDetail + self.betaGroups = betaGroups + self.betaLicenseAgreement = betaLicenseAgreement + self.builds = builds + self.endUserLicenseAgreement = endUserLicenseAgreement + self.gameCenterEnabledVersions = gameCenterEnabledVersions + self.inAppPurchases = inAppPurchases + self.preOrder = preOrder + self.preReleaseVersions = preReleaseVersions + self.prices = prices + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appInfos = try container.decodeIfPresent("appInfos") + appStoreVersions = try container.decodeIfPresent("appStoreVersions") + availableTerritories = try container.decodeIfPresent("availableTerritories") + betaAppLocalizations = try container.decodeIfPresent("betaAppLocalizations") + betaAppReviewDetail = try container.decodeIfPresent("betaAppReviewDetail") + betaGroups = try container.decodeIfPresent("betaGroups") + betaLicenseAgreement = try container.decodeIfPresent("betaLicenseAgreement") + builds = try container.decodeIfPresent("builds") + endUserLicenseAgreement = try container.decodeIfPresent("endUserLicenseAgreement") + gameCenterEnabledVersions = try container.decodeIfPresent("gameCenterEnabledVersions") + inAppPurchases = try container.decodeIfPresent("inAppPurchases") + preOrder = try container.decodeIfPresent("preOrder") + preReleaseVersions = try container.decodeIfPresent("preReleaseVersions") + prices = try container.decodeIfPresent("prices") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appInfos, forKey: "appInfos") + try container.encodeIfPresent(appStoreVersions, forKey: "appStoreVersions") + try container.encodeIfPresent(availableTerritories, forKey: "availableTerritories") + try container.encodeIfPresent(betaAppLocalizations, forKey: "betaAppLocalizations") + try container.encodeIfPresent(betaAppReviewDetail, forKey: "betaAppReviewDetail") + try container.encodeIfPresent(betaGroups, forKey: "betaGroups") + try container.encodeIfPresent(betaLicenseAgreement, forKey: "betaLicenseAgreement") + try container.encodeIfPresent(builds, forKey: "builds") + try container.encodeIfPresent(endUserLicenseAgreement, forKey: "endUserLicenseAgreement") + try container.encodeIfPresent(gameCenterEnabledVersions, forKey: "gameCenterEnabledVersions") + try container.encodeIfPresent(inAppPurchases, forKey: "inAppPurchases") + try container.encodeIfPresent(preOrder, forKey: "preOrder") + try container.encodeIfPresent(preReleaseVersions, forKey: "preReleaseVersions") + try container.encodeIfPresent(prices, forKey: "prices") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appInfos == object.appInfos else { return false } + guard self.appStoreVersions == object.appStoreVersions else { return false } + guard self.availableTerritories == object.availableTerritories else { return false } + guard self.betaAppLocalizations == object.betaAppLocalizations else { return false } + guard self.betaAppReviewDetail == object.betaAppReviewDetail else { return false } + guard self.betaGroups == object.betaGroups else { return false } + guard self.betaLicenseAgreement == object.betaLicenseAgreement else { return false } + guard self.builds == object.builds else { return false } + guard self.endUserLicenseAgreement == object.endUserLicenseAgreement else { return false } + guard self.gameCenterEnabledVersions == object.gameCenterEnabledVersions else { return false } + guard self.inAppPurchases == object.inAppPurchases else { return false } + guard self.preOrder == object.preOrder else { return false } + guard self.preReleaseVersions == object.preReleaseVersions else { return false } + guard self.prices == object.prices else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppBetaTestersLinkagesRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppBetaTestersLinkagesRequest.swift new file mode 100644 index 000000000..c5cdd7c91 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppBetaTestersLinkagesRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppBetaTestersLinkagesRequest: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaTesters = "betaTesters" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppBetaTestersLinkagesRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppBetaTestersLinkagesRequest, rhs: AppBetaTestersLinkagesRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategoriesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategoriesResponse.swift new file mode 100644 index 000000000..ef70b455f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategoriesResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppCategoriesResponse: APIModel { + + public var data: [AppCategory] + + public var links: PagedDocumentLinks + + public var included: [Included]? + + public var meta: PagingInformation? + + public init(data: [AppCategory], links: PagedDocumentLinks, included: [Included]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppCategoriesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppCategoriesResponse, rhs: AppCategoriesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategory.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategory.swift new file mode 100644 index 000000000..bf9771539 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategory.swift @@ -0,0 +1,369 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppCategory: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var platforms: [Platform]? + + public init(platforms: [Platform]? = nil) { + self.platforms = platforms + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + platforms = try container.decodeArrayIfPresent("platforms") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(platforms, forKey: "platforms") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.platforms == object.platforms else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var parent: Parent? + + public var subcategories: Subcategories? + + public class Parent: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Parent else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: Parent, rhs: Parent) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Subcategories: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Subcategories else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: Subcategories, rhs: Subcategories) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(parent: Parent? = nil, subcategories: Subcategories? = nil) { + self.parent = parent + self.subcategories = subcategories + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + parent = try container.decodeIfPresent("parent") + subcategories = try container.decodeIfPresent("subcategories") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(parent, forKey: "parent") + try container.encodeIfPresent(subcategories, forKey: "subcategories") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.parent == object.parent else { return false } + guard self.subcategories == object.subcategories else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppCategory else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppCategory, rhs: AppCategory) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategoryResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategoryResponse.swift new file mode 100644 index 000000000..4098f63e9 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategoryResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppCategoryResponse: APIModel { + + public var data: AppCategory + + public var links: DocumentLinks + + public var included: [Included]? + + public init(data: AppCategory, links: DocumentLinks, included: [Included]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppCategoryResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: AppCategoryResponse, rhs: AppCategoryResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclaration.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclaration.swift new file mode 100644 index 000000000..e541c3917 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclaration.swift @@ -0,0 +1,308 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppEncryptionDeclaration: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appEncryptionDeclarations = "appEncryptionDeclarations" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var appEncryptionDeclarationState: AppEncryptionDeclarationState? + + public var availableOnFrenchStore: Bool? + + public var codeValue: String? + + public var containsProprietaryCryptography: Bool? + + public var containsThirdPartyCryptography: Bool? + + public var documentName: String? + + public var documentType: String? + + public var documentUrl: String? + + public var exempt: Bool? + + public var platform: Platform? + + public var uploadedDate: DateTime? + + public var usesEncryption: Bool? + + public init(appEncryptionDeclarationState: AppEncryptionDeclarationState? = nil, availableOnFrenchStore: Bool? = nil, codeValue: String? = nil, containsProprietaryCryptography: Bool? = nil, containsThirdPartyCryptography: Bool? = nil, documentName: String? = nil, documentType: String? = nil, documentUrl: String? = nil, exempt: Bool? = nil, platform: Platform? = nil, uploadedDate: DateTime? = nil, usesEncryption: Bool? = nil) { + self.appEncryptionDeclarationState = appEncryptionDeclarationState + self.availableOnFrenchStore = availableOnFrenchStore + self.codeValue = codeValue + self.containsProprietaryCryptography = containsProprietaryCryptography + self.containsThirdPartyCryptography = containsThirdPartyCryptography + self.documentName = documentName + self.documentType = documentType + self.documentUrl = documentUrl + self.exempt = exempt + self.platform = platform + self.uploadedDate = uploadedDate + self.usesEncryption = usesEncryption + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appEncryptionDeclarationState = try container.decodeIfPresent("appEncryptionDeclarationState") + availableOnFrenchStore = try container.decodeIfPresent("availableOnFrenchStore") + codeValue = try container.decodeIfPresent("codeValue") + containsProprietaryCryptography = try container.decodeIfPresent("containsProprietaryCryptography") + containsThirdPartyCryptography = try container.decodeIfPresent("containsThirdPartyCryptography") + documentName = try container.decodeIfPresent("documentName") + documentType = try container.decodeIfPresent("documentType") + documentUrl = try container.decodeIfPresent("documentUrl") + exempt = try container.decodeIfPresent("exempt") + platform = try container.decodeIfPresent("platform") + uploadedDate = try container.decodeIfPresent("uploadedDate") + usesEncryption = try container.decodeIfPresent("usesEncryption") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appEncryptionDeclarationState, forKey: "appEncryptionDeclarationState") + try container.encodeIfPresent(availableOnFrenchStore, forKey: "availableOnFrenchStore") + try container.encodeIfPresent(codeValue, forKey: "codeValue") + try container.encodeIfPresent(containsProprietaryCryptography, forKey: "containsProprietaryCryptography") + try container.encodeIfPresent(containsThirdPartyCryptography, forKey: "containsThirdPartyCryptography") + try container.encodeIfPresent(documentName, forKey: "documentName") + try container.encodeIfPresent(documentType, forKey: "documentType") + try container.encodeIfPresent(documentUrl, forKey: "documentUrl") + try container.encodeIfPresent(exempt, forKey: "exempt") + try container.encodeIfPresent(platform, forKey: "platform") + try container.encodeIfPresent(uploadedDate, forKey: "uploadedDate") + try container.encodeIfPresent(usesEncryption, forKey: "usesEncryption") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.appEncryptionDeclarationState == object.appEncryptionDeclarationState else { return false } + guard self.availableOnFrenchStore == object.availableOnFrenchStore else { return false } + guard self.codeValue == object.codeValue else { return false } + guard self.containsProprietaryCryptography == object.containsProprietaryCryptography else { return false } + guard self.containsThirdPartyCryptography == object.containsThirdPartyCryptography else { return false } + guard self.documentName == object.documentName else { return false } + guard self.documentType == object.documentType else { return false } + guard self.documentUrl == object.documentUrl else { return false } + guard self.exempt == object.exempt else { return false } + guard self.platform == object.platform else { return false } + guard self.uploadedDate == object.uploadedDate else { return false } + guard self.usesEncryption == object.usesEncryption else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var app: App? + + public class App: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App? = nil) { + self.app = app + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decodeIfPresent("app") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(app, forKey: "app") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppEncryptionDeclaration else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppEncryptionDeclaration, rhs: AppEncryptionDeclaration) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationBuildsLinkagesRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationBuildsLinkagesRequest.swift new file mode 100644 index 000000000..8ac09fa62 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationBuildsLinkagesRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppEncryptionDeclarationBuildsLinkagesRequest: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppEncryptionDeclarationBuildsLinkagesRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppEncryptionDeclarationBuildsLinkagesRequest, rhs: AppEncryptionDeclarationBuildsLinkagesRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationResponse.swift new file mode 100644 index 000000000..847eea368 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppEncryptionDeclarationResponse: APIModel { + + public var data: AppEncryptionDeclaration + + public var links: DocumentLinks + + public var included: [App]? + + public init(data: AppEncryptionDeclaration, links: DocumentLinks, included: [App]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppEncryptionDeclarationResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: AppEncryptionDeclarationResponse, rhs: AppEncryptionDeclarationResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationState.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationState.swift new file mode 100644 index 000000000..daaa1e606 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationState.swift @@ -0,0 +1,14 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum AppEncryptionDeclarationState: String, Codable, Equatable, CaseIterable { + case inReview = "IN_REVIEW" + case approved = "APPROVED" + case rejected = "REJECTED" + case invalid = "INVALID" + case expired = "EXPIRED" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationsResponse.swift new file mode 100644 index 000000000..7363e4081 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclarationsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppEncryptionDeclarationsResponse: APIModel { + + public var data: [AppEncryptionDeclaration] + + public var links: PagedDocumentLinks + + public var included: [App]? + + public var meta: PagingInformation? + + public init(data: [AppEncryptionDeclaration], links: PagedDocumentLinks, included: [App]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppEncryptionDeclarationsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppEncryptionDeclarationsResponse, rhs: AppEncryptionDeclarationsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfo.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfo.swift new file mode 100644 index 000000000..f191e9ca1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfo.swift @@ -0,0 +1,1113 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppInfo: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var appStoreAgeRating: AppStoreAgeRating? + + public var appStoreState: AppStoreVersionState? + + public var brazilAgeRating: BrazilAgeRating? + + public var kidsAgeBand: KidsAgeBand? + + public init(appStoreAgeRating: AppStoreAgeRating? = nil, appStoreState: AppStoreVersionState? = nil, brazilAgeRating: BrazilAgeRating? = nil, kidsAgeBand: KidsAgeBand? = nil) { + self.appStoreAgeRating = appStoreAgeRating + self.appStoreState = appStoreState + self.brazilAgeRating = brazilAgeRating + self.kidsAgeBand = kidsAgeBand + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreAgeRating = try container.decodeIfPresent("appStoreAgeRating") + appStoreState = try container.decodeIfPresent("appStoreState") + brazilAgeRating = try container.decodeIfPresent("brazilAgeRating") + kidsAgeBand = try container.decodeIfPresent("kidsAgeBand") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appStoreAgeRating, forKey: "appStoreAgeRating") + try container.encodeIfPresent(appStoreState, forKey: "appStoreState") + try container.encodeIfPresent(brazilAgeRating, forKey: "brazilAgeRating") + try container.encodeIfPresent(kidsAgeBand, forKey: "kidsAgeBand") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.appStoreAgeRating == object.appStoreAgeRating else { return false } + guard self.appStoreState == object.appStoreState else { return false } + guard self.brazilAgeRating == object.brazilAgeRating else { return false } + guard self.kidsAgeBand == object.kidsAgeBand else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var app: App? + + public var appInfoLocalizations: AppInfoLocalizations? + + public var primaryCategory: PrimaryCategory? + + public var primarySubcategoryOne: PrimarySubcategoryOne? + + public var primarySubcategoryTwo: PrimarySubcategoryTwo? + + public var secondaryCategory: SecondaryCategory? + + public var secondarySubcategoryOne: SecondarySubcategoryOne? + + public var secondarySubcategoryTwo: SecondarySubcategoryTwo? + + public class App: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class AppInfoLocalizations: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appInfoLocalizations = "appInfoLocalizations" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppInfoLocalizations else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppInfoLocalizations, rhs: AppInfoLocalizations) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class PrimaryCategory: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PrimaryCategory else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: PrimaryCategory, rhs: PrimaryCategory) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class PrimarySubcategoryOne: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PrimarySubcategoryOne else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: PrimarySubcategoryOne, rhs: PrimarySubcategoryOne) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class PrimarySubcategoryTwo: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PrimarySubcategoryTwo else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: PrimarySubcategoryTwo, rhs: PrimarySubcategoryTwo) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class SecondaryCategory: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? SecondaryCategory else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: SecondaryCategory, rhs: SecondaryCategory) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class SecondarySubcategoryOne: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? SecondarySubcategoryOne else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: SecondarySubcategoryOne, rhs: SecondarySubcategoryOne) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class SecondarySubcategoryTwo: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? SecondarySubcategoryTwo else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: SecondarySubcategoryTwo, rhs: SecondarySubcategoryTwo) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App? = nil, appInfoLocalizations: AppInfoLocalizations? = nil, primaryCategory: PrimaryCategory? = nil, primarySubcategoryOne: PrimarySubcategoryOne? = nil, primarySubcategoryTwo: PrimarySubcategoryTwo? = nil, secondaryCategory: SecondaryCategory? = nil, secondarySubcategoryOne: SecondarySubcategoryOne? = nil, secondarySubcategoryTwo: SecondarySubcategoryTwo? = nil) { + self.app = app + self.appInfoLocalizations = appInfoLocalizations + self.primaryCategory = primaryCategory + self.primarySubcategoryOne = primarySubcategoryOne + self.primarySubcategoryTwo = primarySubcategoryTwo + self.secondaryCategory = secondaryCategory + self.secondarySubcategoryOne = secondarySubcategoryOne + self.secondarySubcategoryTwo = secondarySubcategoryTwo + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decodeIfPresent("app") + appInfoLocalizations = try container.decodeIfPresent("appInfoLocalizations") + primaryCategory = try container.decodeIfPresent("primaryCategory") + primarySubcategoryOne = try container.decodeIfPresent("primarySubcategoryOne") + primarySubcategoryTwo = try container.decodeIfPresent("primarySubcategoryTwo") + secondaryCategory = try container.decodeIfPresent("secondaryCategory") + secondarySubcategoryOne = try container.decodeIfPresent("secondarySubcategoryOne") + secondarySubcategoryTwo = try container.decodeIfPresent("secondarySubcategoryTwo") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(app, forKey: "app") + try container.encodeIfPresent(appInfoLocalizations, forKey: "appInfoLocalizations") + try container.encodeIfPresent(primaryCategory, forKey: "primaryCategory") + try container.encodeIfPresent(primarySubcategoryOne, forKey: "primarySubcategoryOne") + try container.encodeIfPresent(primarySubcategoryTwo, forKey: "primarySubcategoryTwo") + try container.encodeIfPresent(secondaryCategory, forKey: "secondaryCategory") + try container.encodeIfPresent(secondarySubcategoryOne, forKey: "secondarySubcategoryOne") + try container.encodeIfPresent(secondarySubcategoryTwo, forKey: "secondarySubcategoryTwo") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + guard self.appInfoLocalizations == object.appInfoLocalizations else { return false } + guard self.primaryCategory == object.primaryCategory else { return false } + guard self.primarySubcategoryOne == object.primarySubcategoryOne else { return false } + guard self.primarySubcategoryTwo == object.primarySubcategoryTwo else { return false } + guard self.secondaryCategory == object.secondaryCategory else { return false } + guard self.secondarySubcategoryOne == object.secondarySubcategoryOne else { return false } + guard self.secondarySubcategoryTwo == object.secondarySubcategoryTwo else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppInfo else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppInfo, rhs: AppInfo) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalization.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalization.swift new file mode 100644 index 000000000..7fb8b3f27 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalization.swift @@ -0,0 +1,266 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppInfoLocalization: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appInfoLocalizations = "appInfoLocalizations" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var locale: String? + + public var name: String? + + public var privacyPolicyText: String? + + public var privacyPolicyUrl: String? + + public var subtitle: String? + + public init(locale: String? = nil, name: String? = nil, privacyPolicyText: String? = nil, privacyPolicyUrl: String? = nil, subtitle: String? = nil) { + self.locale = locale + self.name = name + self.privacyPolicyText = privacyPolicyText + self.privacyPolicyUrl = privacyPolicyUrl + self.subtitle = subtitle + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + locale = try container.decodeIfPresent("locale") + name = try container.decodeIfPresent("name") + privacyPolicyText = try container.decodeIfPresent("privacyPolicyText") + privacyPolicyUrl = try container.decodeIfPresent("privacyPolicyUrl") + subtitle = try container.decodeIfPresent("subtitle") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(locale, forKey: "locale") + try container.encodeIfPresent(name, forKey: "name") + try container.encodeIfPresent(privacyPolicyText, forKey: "privacyPolicyText") + try container.encodeIfPresent(privacyPolicyUrl, forKey: "privacyPolicyUrl") + try container.encodeIfPresent(subtitle, forKey: "subtitle") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.locale == object.locale else { return false } + guard self.name == object.name else { return false } + guard self.privacyPolicyText == object.privacyPolicyText else { return false } + guard self.privacyPolicyUrl == object.privacyPolicyUrl else { return false } + guard self.subtitle == object.subtitle else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var appInfo: AppInfo? + + public class AppInfo: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppInfo else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppInfo, rhs: AppInfo) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appInfo: AppInfo? = nil) { + self.appInfo = appInfo + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appInfo = try container.decodeIfPresent("appInfo") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appInfo, forKey: "appInfo") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appInfo == object.appInfo else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppInfoLocalization else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppInfoLocalization, rhs: AppInfoLocalization) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationCreateRequest.swift new file mode 100644 index 000000000..0d7280f18 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationCreateRequest.swift @@ -0,0 +1,242 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppInfoLocalizationCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appInfoLocalizations = "appInfoLocalizations" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var appInfo: AppInfo + + public class AppInfo: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppInfo else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppInfo, rhs: AppInfo) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appInfo: AppInfo) { + self.appInfo = appInfo + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appInfo = try container.decode("appInfo") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(appInfo, forKey: "appInfo") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appInfo == object.appInfo else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var locale: String + + public var name: String? + + public var privacyPolicyText: String? + + public var privacyPolicyUrl: String? + + public var subtitle: String? + + public init(locale: String, name: String? = nil, privacyPolicyText: String? = nil, privacyPolicyUrl: String? = nil, subtitle: String? = nil) { + self.locale = locale + self.name = name + self.privacyPolicyText = privacyPolicyText + self.privacyPolicyUrl = privacyPolicyUrl + self.subtitle = subtitle + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + locale = try container.decode("locale") + name = try container.decodeIfPresent("name") + privacyPolicyText = try container.decodeIfPresent("privacyPolicyText") + privacyPolicyUrl = try container.decodeIfPresent("privacyPolicyUrl") + subtitle = try container.decodeIfPresent("subtitle") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(locale, forKey: "locale") + try container.encodeIfPresent(name, forKey: "name") + try container.encodeIfPresent(privacyPolicyText, forKey: "privacyPolicyText") + try container.encodeIfPresent(privacyPolicyUrl, forKey: "privacyPolicyUrl") + try container.encodeIfPresent(subtitle, forKey: "subtitle") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.locale == object.locale else { return false } + guard self.name == object.name else { return false } + guard self.privacyPolicyText == object.privacyPolicyText else { return false } + guard self.privacyPolicyUrl == object.privacyPolicyUrl else { return false } + guard self.subtitle == object.subtitle else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppInfoLocalizationCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppInfoLocalizationCreateRequest, rhs: AppInfoLocalizationCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationResponse.swift new file mode 100644 index 000000000..80ab3fe5b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppInfoLocalizationResponse: APIModel { + + public var data: AppInfoLocalization + + public var links: DocumentLinks + + public init(data: AppInfoLocalization, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppInfoLocalizationResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppInfoLocalizationResponse, rhs: AppInfoLocalizationResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationUpdateRequest.swift new file mode 100644 index 000000000..ff12f4930 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationUpdateRequest.swift @@ -0,0 +1,133 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppInfoLocalizationUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appInfoLocalizations = "appInfoLocalizations" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var name: String? + + public var privacyPolicyText: String? + + public var privacyPolicyUrl: String? + + public var subtitle: String? + + public init(name: String? = nil, privacyPolicyText: String? = nil, privacyPolicyUrl: String? = nil, subtitle: String? = nil) { + self.name = name + self.privacyPolicyText = privacyPolicyText + self.privacyPolicyUrl = privacyPolicyUrl + self.subtitle = subtitle + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + name = try container.decodeIfPresent("name") + privacyPolicyText = try container.decodeIfPresent("privacyPolicyText") + privacyPolicyUrl = try container.decodeIfPresent("privacyPolicyUrl") + subtitle = try container.decodeIfPresent("subtitle") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(name, forKey: "name") + try container.encodeIfPresent(privacyPolicyText, forKey: "privacyPolicyText") + try container.encodeIfPresent(privacyPolicyUrl, forKey: "privacyPolicyUrl") + try container.encodeIfPresent(subtitle, forKey: "subtitle") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.name == object.name else { return false } + guard self.privacyPolicyText == object.privacyPolicyText else { return false } + guard self.privacyPolicyUrl == object.privacyPolicyUrl else { return false } + guard self.subtitle == object.subtitle else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppInfoLocalizationUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppInfoLocalizationUpdateRequest, rhs: AppInfoLocalizationUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationsResponse.swift new file mode 100644 index 000000000..9f91ba3e4 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalizationsResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppInfoLocalizationsResponse: APIModel { + + public var data: [AppInfoLocalization] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init(data: [AppInfoLocalization], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppInfoLocalizationsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppInfoLocalizationsResponse, rhs: AppInfoLocalizationsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoResponse.swift new file mode 100644 index 000000000..1ea14a102 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppInfoResponse: APIModel { + + public var data: AppInfo + + public var links: DocumentLinks + + public var included: [Included]? + + public init(data: AppInfo, links: DocumentLinks, included: [Included]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppInfoResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: AppInfoResponse, rhs: AppInfoResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoUpdateRequest.swift new file mode 100644 index 000000000..99fe78e2a --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoUpdateRequest.swift @@ -0,0 +1,577 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppInfoUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + } + + public var id: String + + public var type: `Type` + + public var relationships: Relationships? + + public class Relationships: APIModel { + + public var primaryCategory: PrimaryCategory? + + public var primarySubcategoryOne: PrimarySubcategoryOne? + + public var primarySubcategoryTwo: PrimarySubcategoryTwo? + + public var secondaryCategory: SecondaryCategory? + + public var secondarySubcategoryOne: SecondarySubcategoryOne? + + public var secondarySubcategoryTwo: SecondarySubcategoryTwo? + + public class PrimaryCategory: APIModel { + + public var data: DataType? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PrimaryCategory else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: PrimaryCategory, rhs: PrimaryCategory) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class PrimarySubcategoryOne: APIModel { + + public var data: DataType? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PrimarySubcategoryOne else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: PrimarySubcategoryOne, rhs: PrimarySubcategoryOne) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class PrimarySubcategoryTwo: APIModel { + + public var data: DataType? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PrimarySubcategoryTwo else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: PrimarySubcategoryTwo, rhs: PrimarySubcategoryTwo) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class SecondaryCategory: APIModel { + + public var data: DataType? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? SecondaryCategory else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: SecondaryCategory, rhs: SecondaryCategory) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class SecondarySubcategoryOne: APIModel { + + public var data: DataType? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? SecondarySubcategoryOne else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: SecondarySubcategoryOne, rhs: SecondarySubcategoryOne) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class SecondarySubcategoryTwo: APIModel { + + public var data: DataType? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appCategories = "appCategories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? SecondarySubcategoryTwo else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: SecondarySubcategoryTwo, rhs: SecondarySubcategoryTwo) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(primaryCategory: PrimaryCategory? = nil, primarySubcategoryOne: PrimarySubcategoryOne? = nil, primarySubcategoryTwo: PrimarySubcategoryTwo? = nil, secondaryCategory: SecondaryCategory? = nil, secondarySubcategoryOne: SecondarySubcategoryOne? = nil, secondarySubcategoryTwo: SecondarySubcategoryTwo? = nil) { + self.primaryCategory = primaryCategory + self.primarySubcategoryOne = primarySubcategoryOne + self.primarySubcategoryTwo = primarySubcategoryTwo + self.secondaryCategory = secondaryCategory + self.secondarySubcategoryOne = secondarySubcategoryOne + self.secondarySubcategoryTwo = secondarySubcategoryTwo + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + primaryCategory = try container.decodeIfPresent("primaryCategory") + primarySubcategoryOne = try container.decodeIfPresent("primarySubcategoryOne") + primarySubcategoryTwo = try container.decodeIfPresent("primarySubcategoryTwo") + secondaryCategory = try container.decodeIfPresent("secondaryCategory") + secondarySubcategoryOne = try container.decodeIfPresent("secondarySubcategoryOne") + secondarySubcategoryTwo = try container.decodeIfPresent("secondarySubcategoryTwo") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(primaryCategory, forKey: "primaryCategory") + try container.encodeIfPresent(primarySubcategoryOne, forKey: "primarySubcategoryOne") + try container.encodeIfPresent(primarySubcategoryTwo, forKey: "primarySubcategoryTwo") + try container.encodeIfPresent(secondaryCategory, forKey: "secondaryCategory") + try container.encodeIfPresent(secondarySubcategoryOne, forKey: "secondarySubcategoryOne") + try container.encodeIfPresent(secondarySubcategoryTwo, forKey: "secondarySubcategoryTwo") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.primaryCategory == object.primaryCategory else { return false } + guard self.primarySubcategoryOne == object.primarySubcategoryOne else { return false } + guard self.primarySubcategoryTwo == object.primarySubcategoryTwo else { return false } + guard self.secondaryCategory == object.secondaryCategory else { return false } + guard self.secondarySubcategoryOne == object.secondarySubcategoryOne else { return false } + guard self.secondarySubcategoryTwo == object.secondarySubcategoryTwo else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, relationships: Relationships? = nil) { + self.id = id + self.type = type + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppInfoUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppInfoUpdateRequest, rhs: AppInfoUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfosResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfosResponse.swift new file mode 100644 index 000000000..1e8c03204 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfosResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppInfosResponse: APIModel { + + public var data: [AppInfo] + + public var links: PagedDocumentLinks + + public var included: [Included]? + + public var meta: PagingInformation? + + public init(data: [AppInfo], links: PagedDocumentLinks, included: [Included]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppInfosResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppInfosResponse, rhs: AppInfosResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppMediaAssetState.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppMediaAssetState.swift new file mode 100644 index 000000000..8f16b8e11 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppMediaAssetState.swift @@ -0,0 +1,56 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppMediaAssetState: APIModel { + + public enum State: String, Codable, Equatable, CaseIterable { + case awaitingUpload = "AWAITING_UPLOAD" + case uploadComplete = "UPLOAD_COMPLETE" + case complete = "COMPLETE" + case failed = "FAILED" + } + + 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 + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + errors = try container.decodeArrayIfPresent("errors") + state = try container.decodeIfPresent("state") + warnings = try container.decodeArrayIfPresent("warnings") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(errors, forKey: "errors") + try container.encodeIfPresent(state, forKey: "state") + try container.encodeIfPresent(warnings, forKey: "warnings") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppMediaAssetState else { return false } + guard self.errors == object.errors else { return false } + guard self.state == object.state else { return false } + guard self.warnings == object.warnings else { return false } + return true + } + + public static func == (lhs: AppMediaAssetState, rhs: AppMediaAssetState) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppMediaStateError.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppMediaStateError.swift new file mode 100644 index 000000000..e34e448a5 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppMediaStateError.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppMediaStateError: APIModel { + + public var code: String? + + public var description: String? + + public init(code: String? = nil, description: String? = nil) { + self.code = code + self.description = description + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + code = try container.decodeIfPresent("code") + description = try container.decodeIfPresent("description") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(code, forKey: "code") + try container.encodeIfPresent(description, forKey: "description") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppMediaStateError else { return false } + guard self.code == object.code else { return false } + guard self.description == object.description else { return false } + return true + } + + public static func == (lhs: AppMediaStateError, rhs: AppMediaStateError) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrder.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrder.swift new file mode 100644 index 000000000..3c5046768 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrder.swift @@ -0,0 +1,248 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreOrder: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreOrders = "appPreOrders" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var appReleaseDate: DateDay? + + public var preOrderAvailableDate: DateDay? + + public init(appReleaseDate: DateDay? = nil, preOrderAvailableDate: DateDay? = nil) { + self.appReleaseDate = appReleaseDate + self.preOrderAvailableDate = preOrderAvailableDate + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appReleaseDate = try container.decodeIfPresent("appReleaseDate") + preOrderAvailableDate = try container.decodeIfPresent("preOrderAvailableDate") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appReleaseDate, forKey: "appReleaseDate") + try container.encodeIfPresent(preOrderAvailableDate, forKey: "preOrderAvailableDate") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.appReleaseDate == object.appReleaseDate else { return false } + guard self.preOrderAvailableDate == object.preOrderAvailableDate else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var app: App? + + public class App: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App? = nil) { + self.app = app + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decodeIfPresent("app") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(app, forKey: "app") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreOrder else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppPreOrder, rhs: AppPreOrder) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrderCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrderCreateRequest.swift new file mode 100644 index 000000000..33805d355 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrderCreateRequest.swift @@ -0,0 +1,218 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreOrderCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreOrders = "appPreOrders" + } + + public var relationships: Relationships + + public var type: `Type` + + public var attributes: Attributes? + + public class Relationships: APIModel { + + public var app: App + + public class App: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App) { + self.app = app + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decode("app") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(app, forKey: "app") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var appReleaseDate: DateDay? + + public init(appReleaseDate: DateDay? = nil) { + self.appReleaseDate = appReleaseDate + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appReleaseDate = try container.decodeIfPresent("appReleaseDate") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appReleaseDate, forKey: "appReleaseDate") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.appReleaseDate == object.appReleaseDate else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, type: `Type`, attributes: Attributes? = nil) { + self.relationships = relationships + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreOrderCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppPreOrderCreateRequest, rhs: AppPreOrderCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrderResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrderResponse.swift new file mode 100644 index 000000000..dc73b9bd7 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrderResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreOrderResponse: APIModel { + + public var data: AppPreOrder + + public var links: DocumentLinks + + public init(data: AppPreOrder, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreOrderResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppPreOrderResponse, rhs: AppPreOrderResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrderUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrderUpdateRequest.swift new file mode 100644 index 000000000..7e3fa7e32 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrderUpdateRequest.swift @@ -0,0 +1,115 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreOrderUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreOrders = "appPreOrders" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var appReleaseDate: DateDay? + + public init(appReleaseDate: DateDay? = nil) { + self.appReleaseDate = appReleaseDate + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appReleaseDate = try container.decodeIfPresent("appReleaseDate") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appReleaseDate, forKey: "appReleaseDate") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.appReleaseDate == object.appReleaseDate else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreOrderUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppPreOrderUpdateRequest, rhs: AppPreOrderUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreview.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreview.swift new file mode 100644 index 000000000..7d3d9f414 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreview.swift @@ -0,0 +1,290 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreview: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreviews = "appPreviews" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var assetDeliveryState: AppMediaAssetState? + + public var fileName: String? + + public var fileSize: Int? + + public var mimeType: String? + + public var previewFrameTimeCode: String? + + public var previewImage: ImageAsset? + + public var sourceFileChecksum: String? + + public var uploadOperations: [UploadOperation]? + + public var videoUrl: String? + + public init(assetDeliveryState: AppMediaAssetState? = nil, fileName: String? = nil, fileSize: Int? = nil, mimeType: String? = nil, previewFrameTimeCode: String? = nil, previewImage: ImageAsset? = nil, sourceFileChecksum: String? = nil, uploadOperations: [UploadOperation]? = nil, videoUrl: String? = nil) { + self.assetDeliveryState = assetDeliveryState + self.fileName = fileName + self.fileSize = fileSize + self.mimeType = mimeType + self.previewFrameTimeCode = previewFrameTimeCode + self.previewImage = previewImage + self.sourceFileChecksum = sourceFileChecksum + self.uploadOperations = uploadOperations + self.videoUrl = videoUrl + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + assetDeliveryState = try container.decodeIfPresent("assetDeliveryState") + fileName = try container.decodeIfPresent("fileName") + fileSize = try container.decodeIfPresent("fileSize") + mimeType = try container.decodeIfPresent("mimeType") + previewFrameTimeCode = try container.decodeIfPresent("previewFrameTimeCode") + previewImage = try container.decodeIfPresent("previewImage") + sourceFileChecksum = try container.decodeIfPresent("sourceFileChecksum") + uploadOperations = try container.decodeArrayIfPresent("uploadOperations") + videoUrl = try container.decodeIfPresent("videoUrl") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(assetDeliveryState, forKey: "assetDeliveryState") + try container.encodeIfPresent(fileName, forKey: "fileName") + try container.encodeIfPresent(fileSize, forKey: "fileSize") + try container.encodeIfPresent(mimeType, forKey: "mimeType") + try container.encodeIfPresent(previewFrameTimeCode, forKey: "previewFrameTimeCode") + try container.encodeIfPresent(previewImage, forKey: "previewImage") + try container.encodeIfPresent(sourceFileChecksum, forKey: "sourceFileChecksum") + try container.encodeIfPresent(uploadOperations, forKey: "uploadOperations") + try container.encodeIfPresent(videoUrl, forKey: "videoUrl") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.assetDeliveryState == object.assetDeliveryState else { return false } + guard self.fileName == object.fileName else { return false } + guard self.fileSize == object.fileSize else { return false } + guard self.mimeType == object.mimeType else { return false } + guard self.previewFrameTimeCode == object.previewFrameTimeCode else { return false } + guard self.previewImage == object.previewImage else { return false } + guard self.sourceFileChecksum == object.sourceFileChecksum else { return false } + guard self.uploadOperations == object.uploadOperations else { return false } + guard self.videoUrl == object.videoUrl else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var appPreviewSet: AppPreviewSet? + + public class AppPreviewSet: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreviewSets = "appPreviewSets" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreviewSet else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppPreviewSet, rhs: AppPreviewSet) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appPreviewSet: AppPreviewSet? = nil) { + self.appPreviewSet = appPreviewSet + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appPreviewSet = try container.decodeIfPresent("appPreviewSet") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appPreviewSet, forKey: "appPreviewSet") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appPreviewSet == object.appPreviewSet else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreview else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppPreview, rhs: AppPreview) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewCreateRequest.swift new file mode 100644 index 000000000..7d2043bb0 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewCreateRequest.swift @@ -0,0 +1,236 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreviewCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreviews = "appPreviews" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var appPreviewSet: AppPreviewSet + + public class AppPreviewSet: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreviewSets = "appPreviewSets" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreviewSet else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppPreviewSet, rhs: AppPreviewSet) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appPreviewSet: AppPreviewSet) { + self.appPreviewSet = appPreviewSet + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appPreviewSet = try container.decode("appPreviewSet") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(appPreviewSet, forKey: "appPreviewSet") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appPreviewSet == object.appPreviewSet else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var fileName: String + + public var fileSize: Int + + public var mimeType: String? + + public var previewFrameTimeCode: String? + + public init(fileName: String, fileSize: Int, mimeType: String? = nil, previewFrameTimeCode: String? = nil) { + self.fileName = fileName + self.fileSize = fileSize + self.mimeType = mimeType + self.previewFrameTimeCode = previewFrameTimeCode + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + fileName = try container.decode("fileName") + fileSize = try container.decode("fileSize") + mimeType = try container.decodeIfPresent("mimeType") + previewFrameTimeCode = try container.decodeIfPresent("previewFrameTimeCode") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(fileName, forKey: "fileName") + try container.encode(fileSize, forKey: "fileSize") + try container.encodeIfPresent(mimeType, forKey: "mimeType") + try container.encodeIfPresent(previewFrameTimeCode, forKey: "previewFrameTimeCode") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.fileName == object.fileName else { return false } + guard self.fileSize == object.fileSize else { return false } + guard self.mimeType == object.mimeType else { return false } + guard self.previewFrameTimeCode == object.previewFrameTimeCode else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreviewCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppPreviewCreateRequest, rhs: AppPreviewCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewResponse.swift new file mode 100644 index 000000000..0c093084a --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreviewResponse: APIModel { + + public var data: AppPreview + + public var links: DocumentLinks + + public init(data: AppPreview, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreviewResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppPreviewResponse, rhs: AppPreviewResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSet.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSet.swift new file mode 100644 index 000000000..71581e259 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSet.swift @@ -0,0 +1,369 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreviewSet: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreviewSets = "appPreviewSets" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var previewType: PreviewType? + + public init(previewType: PreviewType? = nil) { + self.previewType = previewType + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + previewType = try container.decodeIfPresent("previewType") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(previewType, forKey: "previewType") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.previewType == object.previewType else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var appPreviews: AppPreviews? + + public var appStoreVersionLocalization: AppStoreVersionLocalization? + + public class AppPreviews: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreviews = "appPreviews" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreviews else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppPreviews, rhs: AppPreviews) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class AppStoreVersionLocalization: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionLocalization else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreVersionLocalization, rhs: AppStoreVersionLocalization) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appPreviews: AppPreviews? = nil, appStoreVersionLocalization: AppStoreVersionLocalization? = nil) { + self.appPreviews = appPreviews + self.appStoreVersionLocalization = appStoreVersionLocalization + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appPreviews = try container.decodeIfPresent("appPreviews") + appStoreVersionLocalization = try container.decodeIfPresent("appStoreVersionLocalization") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appPreviews, forKey: "appPreviews") + try container.encodeIfPresent(appStoreVersionLocalization, forKey: "appStoreVersionLocalization") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appPreviews == object.appPreviews else { return false } + guard self.appStoreVersionLocalization == object.appStoreVersionLocalization else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreviewSet else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppPreviewSet, rhs: AppPreviewSet) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetAppPreviewsLinkagesRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetAppPreviewsLinkagesRequest.swift new file mode 100644 index 000000000..f3ab477a8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetAppPreviewsLinkagesRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreviewSetAppPreviewsLinkagesRequest: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreviews = "appPreviews" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreviewSetAppPreviewsLinkagesRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppPreviewSetAppPreviewsLinkagesRequest, rhs: AppPreviewSetAppPreviewsLinkagesRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetAppPreviewsLinkagesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetAppPreviewsLinkagesResponse.swift new file mode 100644 index 000000000..7abf5c477 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetAppPreviewsLinkagesResponse.swift @@ -0,0 +1,90 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreviewSetAppPreviewsLinkagesResponse: APIModel { + + public var data: [DataType] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreviews = "appPreviews" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreviewSetAppPreviewsLinkagesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppPreviewSetAppPreviewsLinkagesResponse, rhs: AppPreviewSetAppPreviewsLinkagesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetCreateRequest.swift new file mode 100644 index 000000000..65d6f6ccb --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetCreateRequest.swift @@ -0,0 +1,218 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreviewSetCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreviewSets = "appPreviewSets" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var appStoreVersionLocalization: AppStoreVersionLocalization + + public class AppStoreVersionLocalization: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionLocalization else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersionLocalization, rhs: AppStoreVersionLocalization) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appStoreVersionLocalization: AppStoreVersionLocalization) { + self.appStoreVersionLocalization = appStoreVersionLocalization + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreVersionLocalization = try container.decode("appStoreVersionLocalization") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(appStoreVersionLocalization, forKey: "appStoreVersionLocalization") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appStoreVersionLocalization == object.appStoreVersionLocalization else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var previewType: PreviewType + + public init(previewType: PreviewType) { + self.previewType = previewType + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + previewType = try container.decode("previewType") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(previewType, forKey: "previewType") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.previewType == object.previewType else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreviewSetCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppPreviewSetCreateRequest, rhs: AppPreviewSetCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetResponse.swift new file mode 100644 index 000000000..235f4db35 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreviewSetResponse: APIModel { + + public var data: AppPreviewSet + + public var links: DocumentLinks + + public var included: [AppPreview]? + + public init(data: AppPreviewSet, links: DocumentLinks, included: [AppPreview]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreviewSetResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: AppPreviewSetResponse, rhs: AppPreviewSetResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetsResponse.swift new file mode 100644 index 000000000..421a1e442 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSetsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreviewSetsResponse: APIModel { + + public var data: [AppPreviewSet] + + public var links: PagedDocumentLinks + + public var included: [AppPreview]? + + public var meta: PagingInformation? + + public init(data: [AppPreviewSet], links: PagedDocumentLinks, included: [AppPreview]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreviewSetsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppPreviewSetsResponse, rhs: AppPreviewSetsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewUpdateRequest.swift new file mode 100644 index 000000000..cc0522169 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewUpdateRequest.swift @@ -0,0 +1,127 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreviewUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreviews = "appPreviews" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var previewFrameTimeCode: String? + + public var sourceFileChecksum: String? + + public var uploaded: Bool? + + public init(previewFrameTimeCode: String? = nil, sourceFileChecksum: String? = nil, uploaded: Bool? = nil) { + self.previewFrameTimeCode = previewFrameTimeCode + self.sourceFileChecksum = sourceFileChecksum + self.uploaded = uploaded + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + previewFrameTimeCode = try container.decodeIfPresent("previewFrameTimeCode") + sourceFileChecksum = try container.decodeIfPresent("sourceFileChecksum") + uploaded = try container.decodeIfPresent("uploaded") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(previewFrameTimeCode, forKey: "previewFrameTimeCode") + try container.encodeIfPresent(sourceFileChecksum, forKey: "sourceFileChecksum") + try container.encodeIfPresent(uploaded, forKey: "uploaded") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.previewFrameTimeCode == object.previewFrameTimeCode else { return false } + guard self.sourceFileChecksum == object.sourceFileChecksum else { return false } + guard self.uploaded == object.uploaded else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreviewUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppPreviewUpdateRequest, rhs: AppPreviewUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewsResponse.swift new file mode 100644 index 000000000..35d27ebfc --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewsResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPreviewsResponse: APIModel { + + public var data: [AppPreview] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init(data: [AppPreview], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreviewsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppPreviewsResponse, rhs: AppPreviewsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPrice.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPrice.swift new file mode 100644 index 000000000..22ab51995 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPrice.swift @@ -0,0 +1,326 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPrice: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPrices = "appPrices" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var relationships: Relationships? + + public class Relationships: APIModel { + + public var app: App? + + public var priceTier: PriceTier? + + public class App: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class PriceTier: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPriceTiers = "appPriceTiers" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PriceTier else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: PriceTier, rhs: PriceTier) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App? = nil, priceTier: PriceTier? = nil) { + self.app = app + self.priceTier = priceTier + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decodeIfPresent("app") + priceTier = try container.decodeIfPresent("priceTier") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(app, forKey: "app") + try container.encodeIfPresent(priceTier, forKey: "priceTier") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + guard self.priceTier == object.priceTier else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPrice else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppPrice, rhs: AppPrice) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePoint.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePoint.swift new file mode 100644 index 000000000..2bb8bf9c1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePoint.swift @@ -0,0 +1,369 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPricePoint: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPricePoints = "appPricePoints" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var customerPrice: String? + + public var proceeds: String? + + public init(customerPrice: String? = nil, proceeds: String? = nil) { + self.customerPrice = customerPrice + self.proceeds = proceeds + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + customerPrice = try container.decodeIfPresent("customerPrice") + proceeds = try container.decodeIfPresent("proceeds") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(customerPrice, forKey: "customerPrice") + try container.encodeIfPresent(proceeds, forKey: "proceeds") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.customerPrice == object.customerPrice else { return false } + guard self.proceeds == object.proceeds else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var priceTier: PriceTier? + + public var territory: Territory? + + public class PriceTier: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPriceTiers = "appPriceTiers" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PriceTier else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: PriceTier, rhs: PriceTier) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Territory: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case territories = "territories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Territory else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: Territory, rhs: Territory) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(priceTier: PriceTier? = nil, territory: Territory? = nil) { + self.priceTier = priceTier + self.territory = territory + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + priceTier = try container.decodeIfPresent("priceTier") + territory = try container.decodeIfPresent("territory") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(priceTier, forKey: "priceTier") + try container.encodeIfPresent(territory, forKey: "territory") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.priceTier == object.priceTier else { return false } + guard self.territory == object.territory else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPricePoint else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppPricePoint, rhs: AppPricePoint) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePointResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePointResponse.swift new file mode 100644 index 000000000..fbc9e67ef --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePointResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPricePointResponse: APIModel { + + public var data: AppPricePoint + + public var links: DocumentLinks + + public var included: [Territory]? + + public init(data: AppPricePoint, links: DocumentLinks, included: [Territory]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPricePointResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: AppPricePointResponse, rhs: AppPricePointResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePointsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePointsResponse.swift new file mode 100644 index 000000000..41d046f4d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePointsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPricePointsResponse: APIModel { + + public var data: [AppPricePoint] + + public var links: PagedDocumentLinks + + public var included: [Territory]? + + public var meta: PagingInformation? + + public init(data: [AppPricePoint], links: PagedDocumentLinks, included: [Territory]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPricePointsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppPricePointsResponse, rhs: AppPricePointsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceResponse.swift new file mode 100644 index 000000000..378fa65e6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPriceResponse: APIModel { + + public var data: AppPrice + + public var links: DocumentLinks + + public init(data: AppPrice, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPriceResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppPriceResponse, rhs: AppPriceResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTier.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTier.swift new file mode 100644 index 000000000..44101a310 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTier.swift @@ -0,0 +1,211 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPriceTier: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPriceTiers = "appPriceTiers" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var relationships: Relationships? + + public class Relationships: APIModel { + + public var pricePoints: PricePoints? + + public class PricePoints: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPricePoints = "appPricePoints" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PricePoints else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: PricePoints, rhs: PricePoints) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(pricePoints: PricePoints? = nil) { + self.pricePoints = pricePoints + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + pricePoints = try container.decodeIfPresent("pricePoints") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(pricePoints, forKey: "pricePoints") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.pricePoints == object.pricePoints else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPriceTier else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppPriceTier, rhs: AppPriceTier) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTierResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTierResponse.swift new file mode 100644 index 000000000..96864173c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTierResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPriceTierResponse: APIModel { + + public var data: AppPriceTier + + public var links: DocumentLinks + + public var included: [AppPricePoint]? + + public init(data: AppPriceTier, links: DocumentLinks, included: [AppPricePoint]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPriceTierResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: AppPriceTierResponse, rhs: AppPriceTierResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTiersResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTiersResponse.swift new file mode 100644 index 000000000..b7e007f87 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTiersResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPriceTiersResponse: APIModel { + + public var data: [AppPriceTier] + + public var links: PagedDocumentLinks + + public var included: [AppPricePoint]? + + public var meta: PagingInformation? + + public init(data: [AppPriceTier], links: PagedDocumentLinks, included: [AppPricePoint]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPriceTiersResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppPriceTiersResponse, rhs: AppPriceTiersResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricesResponse.swift new file mode 100644 index 000000000..17323ad40 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricesResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppPricesResponse: APIModel { + + public var data: [AppPrice] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init(data: [AppPrice], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPricesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppPricesResponse, rhs: AppPricesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppResponse.swift new file mode 100644 index 000000000..b661bd291 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppResponse: APIModel { + + public var data: App + + public var links: DocumentLinks + + public var included: [Included]? + + public init(data: App, links: DocumentLinks, included: [Included]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: AppResponse, rhs: AppResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshot.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshot.swift new file mode 100644 index 000000000..42760c67d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshot.swift @@ -0,0 +1,284 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppScreenshot: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appScreenshots = "appScreenshots" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var assetDeliveryState: AppMediaAssetState? + + 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 uploadOperations: [UploadOperation]? + + public init(assetDeliveryState: AppMediaAssetState? = nil, assetToken: String? = nil, assetType: String? = nil, fileName: String? = nil, fileSize: Int? = nil, imageAsset: ImageAsset? = nil, sourceFileChecksum: String? = nil, uploadOperations: [UploadOperation]? = nil) { + self.assetDeliveryState = assetDeliveryState + self.assetToken = assetToken + self.assetType = assetType + self.fileName = fileName + self.fileSize = fileSize + self.imageAsset = imageAsset + self.sourceFileChecksum = sourceFileChecksum + self.uploadOperations = uploadOperations + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + assetDeliveryState = try container.decodeIfPresent("assetDeliveryState") + assetToken = try container.decodeIfPresent("assetToken") + assetType = try container.decodeIfPresent("assetType") + fileName = try container.decodeIfPresent("fileName") + fileSize = try container.decodeIfPresent("fileSize") + imageAsset = try container.decodeIfPresent("imageAsset") + sourceFileChecksum = try container.decodeIfPresent("sourceFileChecksum") + uploadOperations = try container.decodeArrayIfPresent("uploadOperations") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(assetDeliveryState, forKey: "assetDeliveryState") + try container.encodeIfPresent(assetToken, forKey: "assetToken") + try container.encodeIfPresent(assetType, forKey: "assetType") + try container.encodeIfPresent(fileName, forKey: "fileName") + try container.encodeIfPresent(fileSize, forKey: "fileSize") + try container.encodeIfPresent(imageAsset, forKey: "imageAsset") + try container.encodeIfPresent(sourceFileChecksum, forKey: "sourceFileChecksum") + try container.encodeIfPresent(uploadOperations, forKey: "uploadOperations") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.assetDeliveryState == object.assetDeliveryState else { return false } + guard self.assetToken == object.assetToken else { return false } + guard self.assetType == object.assetType else { return false } + guard self.fileName == object.fileName else { return false } + guard self.fileSize == object.fileSize else { return false } + guard self.imageAsset == object.imageAsset else { return false } + guard self.sourceFileChecksum == object.sourceFileChecksum else { return false } + guard self.uploadOperations == object.uploadOperations else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var appScreenshotSet: AppScreenshotSet? + + public class AppScreenshotSet: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appScreenshotSets = "appScreenshotSets" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshotSet else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppScreenshotSet, rhs: AppScreenshotSet) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appScreenshotSet: AppScreenshotSet? = nil) { + self.appScreenshotSet = appScreenshotSet + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appScreenshotSet = try container.decodeIfPresent("appScreenshotSet") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appScreenshotSet, forKey: "appScreenshotSet") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appScreenshotSet == object.appScreenshotSet else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshot else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppScreenshot, rhs: AppScreenshot) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotCreateRequest.swift new file mode 100644 index 000000000..32e4336f7 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotCreateRequest.swift @@ -0,0 +1,224 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppScreenshotCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appScreenshots = "appScreenshots" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var appScreenshotSet: AppScreenshotSet + + public class AppScreenshotSet: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appScreenshotSets = "appScreenshotSets" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshotSet else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppScreenshotSet, rhs: AppScreenshotSet) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appScreenshotSet: AppScreenshotSet) { + self.appScreenshotSet = appScreenshotSet + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appScreenshotSet = try container.decode("appScreenshotSet") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(appScreenshotSet, forKey: "appScreenshotSet") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appScreenshotSet == object.appScreenshotSet else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var fileName: String + + public var fileSize: Int + + public init(fileName: String, fileSize: Int) { + self.fileName = fileName + self.fileSize = fileSize + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + fileName = try container.decode("fileName") + fileSize = try container.decode("fileSize") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(fileName, forKey: "fileName") + try container.encode(fileSize, forKey: "fileSize") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.fileName == object.fileName else { return false } + guard self.fileSize == object.fileSize else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshotCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppScreenshotCreateRequest, rhs: AppScreenshotCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotResponse.swift new file mode 100644 index 000000000..b4ce2919c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppScreenshotResponse: APIModel { + + public var data: AppScreenshot + + public var links: DocumentLinks + + public init(data: AppScreenshot, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshotResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppScreenshotResponse, rhs: AppScreenshotResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSet.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSet.swift new file mode 100644 index 000000000..ee7a95d59 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSet.swift @@ -0,0 +1,369 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppScreenshotSet: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appScreenshotSets = "appScreenshotSets" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var screenshotDisplayType: ScreenshotDisplayType? + + public init(screenshotDisplayType: ScreenshotDisplayType? = nil) { + self.screenshotDisplayType = screenshotDisplayType + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + screenshotDisplayType = try container.decodeIfPresent("screenshotDisplayType") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(screenshotDisplayType, forKey: "screenshotDisplayType") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.screenshotDisplayType == object.screenshotDisplayType else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var appScreenshots: AppScreenshots? + + public var appStoreVersionLocalization: AppStoreVersionLocalization? + + public class AppScreenshots: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appScreenshots = "appScreenshots" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshots else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppScreenshots, rhs: AppScreenshots) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class AppStoreVersionLocalization: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionLocalization else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreVersionLocalization, rhs: AppStoreVersionLocalization) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appScreenshots: AppScreenshots? = nil, appStoreVersionLocalization: AppStoreVersionLocalization? = nil) { + self.appScreenshots = appScreenshots + self.appStoreVersionLocalization = appStoreVersionLocalization + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appScreenshots = try container.decodeIfPresent("appScreenshots") + appStoreVersionLocalization = try container.decodeIfPresent("appStoreVersionLocalization") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appScreenshots, forKey: "appScreenshots") + try container.encodeIfPresent(appStoreVersionLocalization, forKey: "appStoreVersionLocalization") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appScreenshots == object.appScreenshots else { return false } + guard self.appStoreVersionLocalization == object.appStoreVersionLocalization else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshotSet else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppScreenshotSet, rhs: AppScreenshotSet) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetAppScreenshotsLinkagesRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetAppScreenshotsLinkagesRequest.swift new file mode 100644 index 000000000..ae8f5e514 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetAppScreenshotsLinkagesRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppScreenshotSetAppScreenshotsLinkagesRequest: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appScreenshots = "appScreenshots" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshotSetAppScreenshotsLinkagesRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppScreenshotSetAppScreenshotsLinkagesRequest, rhs: AppScreenshotSetAppScreenshotsLinkagesRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetAppScreenshotsLinkagesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetAppScreenshotsLinkagesResponse.swift new file mode 100644 index 000000000..5caf9e6c2 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetAppScreenshotsLinkagesResponse.swift @@ -0,0 +1,90 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppScreenshotSetAppScreenshotsLinkagesResponse: APIModel { + + public var data: [DataType] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appScreenshots = "appScreenshots" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshotSetAppScreenshotsLinkagesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppScreenshotSetAppScreenshotsLinkagesResponse, rhs: AppScreenshotSetAppScreenshotsLinkagesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetCreateRequest.swift new file mode 100644 index 000000000..a33a3dee9 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetCreateRequest.swift @@ -0,0 +1,218 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppScreenshotSetCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appScreenshotSets = "appScreenshotSets" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var appStoreVersionLocalization: AppStoreVersionLocalization + + public class AppStoreVersionLocalization: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionLocalization else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersionLocalization, rhs: AppStoreVersionLocalization) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appStoreVersionLocalization: AppStoreVersionLocalization) { + self.appStoreVersionLocalization = appStoreVersionLocalization + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreVersionLocalization = try container.decode("appStoreVersionLocalization") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(appStoreVersionLocalization, forKey: "appStoreVersionLocalization") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appStoreVersionLocalization == object.appStoreVersionLocalization else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var screenshotDisplayType: ScreenshotDisplayType + + public init(screenshotDisplayType: ScreenshotDisplayType) { + self.screenshotDisplayType = screenshotDisplayType + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + screenshotDisplayType = try container.decode("screenshotDisplayType") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(screenshotDisplayType, forKey: "screenshotDisplayType") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.screenshotDisplayType == object.screenshotDisplayType else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshotSetCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppScreenshotSetCreateRequest, rhs: AppScreenshotSetCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetResponse.swift new file mode 100644 index 000000000..86777e37c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppScreenshotSetResponse: APIModel { + + public var data: AppScreenshotSet + + public var links: DocumentLinks + + public var included: [AppScreenshot]? + + public init(data: AppScreenshotSet, links: DocumentLinks, included: [AppScreenshot]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshotSetResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: AppScreenshotSetResponse, rhs: AppScreenshotSetResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetsResponse.swift new file mode 100644 index 000000000..d0715dc40 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSetsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppScreenshotSetsResponse: APIModel { + + public var data: [AppScreenshotSet] + + public var links: PagedDocumentLinks + + public var included: [AppScreenshot]? + + public var meta: PagingInformation? + + public init(data: [AppScreenshotSet], links: PagedDocumentLinks, included: [AppScreenshot]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshotSetsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppScreenshotSetsResponse, rhs: AppScreenshotSetsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotUpdateRequest.swift new file mode 100644 index 000000000..fb200b76b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotUpdateRequest.swift @@ -0,0 +1,121 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppScreenshotUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appScreenshots = "appScreenshots" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var sourceFileChecksum: String? + + public var uploaded: Bool? + + public init(sourceFileChecksum: String? = nil, uploaded: Bool? = nil) { + self.sourceFileChecksum = sourceFileChecksum + self.uploaded = uploaded + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + sourceFileChecksum = try container.decodeIfPresent("sourceFileChecksum") + uploaded = try container.decodeIfPresent("uploaded") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(sourceFileChecksum, forKey: "sourceFileChecksum") + try container.encodeIfPresent(uploaded, forKey: "uploaded") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.sourceFileChecksum == object.sourceFileChecksum else { return false } + guard self.uploaded == object.uploaded else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshotUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppScreenshotUpdateRequest, rhs: AppScreenshotUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotsResponse.swift new file mode 100644 index 000000000..861aa9154 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotsResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppScreenshotsResponse: APIModel { + + public var data: [AppScreenshot] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init(data: [AppScreenshot], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshotsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppScreenshotsResponse, rhs: AppScreenshotsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreAgeRating.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreAgeRating.swift new file mode 100644 index 000000000..cd6a3c55a --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreAgeRating.swift @@ -0,0 +1,13 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum AppStoreAgeRating: String, Codable, Equatable, CaseIterable { + case fourPlus = "FOUR_PLUS" + case ninePlus = "NINE_PLUS" + case twelvePlus = "TWELVE_PLUS" + case seventeenPlus = "SEVENTEEN_PLUS" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachment.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachment.swift new file mode 100644 index 000000000..6d768f253 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachment.swift @@ -0,0 +1,266 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreReviewAttachment: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreReviewAttachments = "appStoreReviewAttachments" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var assetDeliveryState: AppMediaAssetState? + + public var fileName: String? + + public var fileSize: Int? + + public var sourceFileChecksum: String? + + public var uploadOperations: [UploadOperation]? + + public init(assetDeliveryState: AppMediaAssetState? = nil, fileName: String? = nil, fileSize: Int? = nil, sourceFileChecksum: String? = nil, uploadOperations: [UploadOperation]? = nil) { + self.assetDeliveryState = assetDeliveryState + self.fileName = fileName + self.fileSize = fileSize + self.sourceFileChecksum = sourceFileChecksum + self.uploadOperations = uploadOperations + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + assetDeliveryState = try container.decodeIfPresent("assetDeliveryState") + fileName = try container.decodeIfPresent("fileName") + fileSize = try container.decodeIfPresent("fileSize") + sourceFileChecksum = try container.decodeIfPresent("sourceFileChecksum") + uploadOperations = try container.decodeArrayIfPresent("uploadOperations") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(assetDeliveryState, forKey: "assetDeliveryState") + try container.encodeIfPresent(fileName, forKey: "fileName") + try container.encodeIfPresent(fileSize, forKey: "fileSize") + try container.encodeIfPresent(sourceFileChecksum, forKey: "sourceFileChecksum") + try container.encodeIfPresent(uploadOperations, forKey: "uploadOperations") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.assetDeliveryState == object.assetDeliveryState else { return false } + guard self.fileName == object.fileName else { return false } + guard self.fileSize == object.fileSize else { return false } + guard self.sourceFileChecksum == object.sourceFileChecksum else { return false } + guard self.uploadOperations == object.uploadOperations else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var appStoreReviewDetail: AppStoreReviewDetail? + + public class AppStoreReviewDetail: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreReviewDetails = "appStoreReviewDetails" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreReviewDetail else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreReviewDetail, rhs: AppStoreReviewDetail) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appStoreReviewDetail: AppStoreReviewDetail? = nil) { + self.appStoreReviewDetail = appStoreReviewDetail + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreReviewDetail = try container.decodeIfPresent("appStoreReviewDetail") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appStoreReviewDetail, forKey: "appStoreReviewDetail") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appStoreReviewDetail == object.appStoreReviewDetail else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreReviewAttachment else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppStoreReviewAttachment, rhs: AppStoreReviewAttachment) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentCreateRequest.swift new file mode 100644 index 000000000..d1fe05b55 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentCreateRequest.swift @@ -0,0 +1,224 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreReviewAttachmentCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreReviewAttachments = "appStoreReviewAttachments" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var appStoreReviewDetail: AppStoreReviewDetail + + public class AppStoreReviewDetail: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreReviewDetails = "appStoreReviewDetails" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreReviewDetail else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreReviewDetail, rhs: AppStoreReviewDetail) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appStoreReviewDetail: AppStoreReviewDetail) { + self.appStoreReviewDetail = appStoreReviewDetail + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreReviewDetail = try container.decode("appStoreReviewDetail") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(appStoreReviewDetail, forKey: "appStoreReviewDetail") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appStoreReviewDetail == object.appStoreReviewDetail else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var fileName: String + + public var fileSize: Int + + public init(fileName: String, fileSize: Int) { + self.fileName = fileName + self.fileSize = fileSize + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + fileName = try container.decode("fileName") + fileSize = try container.decode("fileSize") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(fileName, forKey: "fileName") + try container.encode(fileSize, forKey: "fileSize") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.fileName == object.fileName else { return false } + guard self.fileSize == object.fileSize else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreReviewAttachmentCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreReviewAttachmentCreateRequest, rhs: AppStoreReviewAttachmentCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentResponse.swift new file mode 100644 index 000000000..864a1c36f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreReviewAttachmentResponse: APIModel { + + public var data: AppStoreReviewAttachment + + public var links: DocumentLinks + + public init(data: AppStoreReviewAttachment, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreReviewAttachmentResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreReviewAttachmentResponse, rhs: AppStoreReviewAttachmentResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentUpdateRequest.swift new file mode 100644 index 000000000..0295dbd61 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentUpdateRequest.swift @@ -0,0 +1,121 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreReviewAttachmentUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreReviewAttachments = "appStoreReviewAttachments" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var sourceFileChecksum: String? + + public var uploaded: Bool? + + public init(sourceFileChecksum: String? = nil, uploaded: Bool? = nil) { + self.sourceFileChecksum = sourceFileChecksum + self.uploaded = uploaded + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + sourceFileChecksum = try container.decodeIfPresent("sourceFileChecksum") + uploaded = try container.decodeIfPresent("uploaded") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(sourceFileChecksum, forKey: "sourceFileChecksum") + try container.encodeIfPresent(uploaded, forKey: "uploaded") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.sourceFileChecksum == object.sourceFileChecksum else { return false } + guard self.uploaded == object.uploaded else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreReviewAttachmentUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreReviewAttachmentUpdateRequest, rhs: AppStoreReviewAttachmentUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentsResponse.swift new file mode 100644 index 000000000..5fb0645b7 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachmentsResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreReviewAttachmentsResponse: APIModel { + + public var data: [AppStoreReviewAttachment] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init(data: [AppStoreReviewAttachment], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreReviewAttachmentsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppStoreReviewAttachmentsResponse, rhs: AppStoreReviewAttachmentsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetail.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetail.swift new file mode 100644 index 000000000..7199ccffc --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetail.swift @@ -0,0 +1,411 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreReviewDetail: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreReviewDetails = "appStoreReviewDetails" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var contactEmail: String? + + public var contactFirstName: String? + + public var contactLastName: String? + + public var contactPhone: String? + + public var demoAccountName: String? + + public var demoAccountPassword: String? + + public var demoAccountRequired: Bool? + + public var notes: String? + + public init(contactEmail: String? = nil, contactFirstName: String? = nil, contactLastName: String? = nil, contactPhone: String? = nil, demoAccountName: String? = nil, demoAccountPassword: String? = nil, demoAccountRequired: Bool? = nil, notes: String? = nil) { + self.contactEmail = contactEmail + self.contactFirstName = contactFirstName + self.contactLastName = contactLastName + self.contactPhone = contactPhone + self.demoAccountName = demoAccountName + self.demoAccountPassword = demoAccountPassword + self.demoAccountRequired = demoAccountRequired + self.notes = notes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + contactEmail = try container.decodeIfPresent("contactEmail") + contactFirstName = try container.decodeIfPresent("contactFirstName") + contactLastName = try container.decodeIfPresent("contactLastName") + contactPhone = try container.decodeIfPresent("contactPhone") + demoAccountName = try container.decodeIfPresent("demoAccountName") + demoAccountPassword = try container.decodeIfPresent("demoAccountPassword") + demoAccountRequired = try container.decodeIfPresent("demoAccountRequired") + notes = try container.decodeIfPresent("notes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(contactEmail, forKey: "contactEmail") + try container.encodeIfPresent(contactFirstName, forKey: "contactFirstName") + try container.encodeIfPresent(contactLastName, forKey: "contactLastName") + try container.encodeIfPresent(contactPhone, forKey: "contactPhone") + try container.encodeIfPresent(demoAccountName, forKey: "demoAccountName") + try container.encodeIfPresent(demoAccountPassword, forKey: "demoAccountPassword") + try container.encodeIfPresent(demoAccountRequired, forKey: "demoAccountRequired") + try container.encodeIfPresent(notes, forKey: "notes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.contactEmail == object.contactEmail else { return false } + guard self.contactFirstName == object.contactFirstName else { return false } + guard self.contactLastName == object.contactLastName else { return false } + guard self.contactPhone == object.contactPhone else { return false } + guard self.demoAccountName == object.demoAccountName else { return false } + guard self.demoAccountPassword == object.demoAccountPassword else { return false } + guard self.demoAccountRequired == object.demoAccountRequired else { return false } + guard self.notes == object.notes else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var appStoreReviewAttachments: AppStoreReviewAttachments? + + public var appStoreVersion: AppStoreVersion? + + public class AppStoreReviewAttachments: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreReviewAttachments = "appStoreReviewAttachments" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreReviewAttachments else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppStoreReviewAttachments, rhs: AppStoreReviewAttachments) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class AppStoreVersion: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersion else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreVersion, rhs: AppStoreVersion) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appStoreReviewAttachments: AppStoreReviewAttachments? = nil, appStoreVersion: AppStoreVersion? = nil) { + self.appStoreReviewAttachments = appStoreReviewAttachments + self.appStoreVersion = appStoreVersion + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreReviewAttachments = try container.decodeIfPresent("appStoreReviewAttachments") + appStoreVersion = try container.decodeIfPresent("appStoreVersion") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appStoreReviewAttachments, forKey: "appStoreReviewAttachments") + try container.encodeIfPresent(appStoreVersion, forKey: "appStoreVersion") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appStoreReviewAttachments == object.appStoreReviewAttachments else { return false } + guard self.appStoreVersion == object.appStoreVersion else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreReviewDetail else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppStoreReviewDetail, rhs: AppStoreReviewDetail) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetailCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetailCreateRequest.swift new file mode 100644 index 000000000..0251823f3 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetailCreateRequest.swift @@ -0,0 +1,260 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreReviewDetailCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreReviewDetails = "appStoreReviewDetails" + } + + public var relationships: Relationships + + public var type: `Type` + + public var attributes: Attributes? + + public class Relationships: APIModel { + + public var appStoreVersion: AppStoreVersion + + public class AppStoreVersion: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersion else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersion, rhs: AppStoreVersion) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appStoreVersion: AppStoreVersion) { + self.appStoreVersion = appStoreVersion + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreVersion = try container.decode("appStoreVersion") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(appStoreVersion, forKey: "appStoreVersion") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appStoreVersion == object.appStoreVersion else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var contactEmail: String? + + public var contactFirstName: String? + + public var contactLastName: String? + + public var contactPhone: String? + + public var demoAccountName: String? + + public var demoAccountPassword: String? + + public var demoAccountRequired: Bool? + + public var notes: String? + + public init(contactEmail: String? = nil, contactFirstName: String? = nil, contactLastName: String? = nil, contactPhone: String? = nil, demoAccountName: String? = nil, demoAccountPassword: String? = nil, demoAccountRequired: Bool? = nil, notes: String? = nil) { + self.contactEmail = contactEmail + self.contactFirstName = contactFirstName + self.contactLastName = contactLastName + self.contactPhone = contactPhone + self.demoAccountName = demoAccountName + self.demoAccountPassword = demoAccountPassword + self.demoAccountRequired = demoAccountRequired + self.notes = notes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + contactEmail = try container.decodeIfPresent("contactEmail") + contactFirstName = try container.decodeIfPresent("contactFirstName") + contactLastName = try container.decodeIfPresent("contactLastName") + contactPhone = try container.decodeIfPresent("contactPhone") + demoAccountName = try container.decodeIfPresent("demoAccountName") + demoAccountPassword = try container.decodeIfPresent("demoAccountPassword") + demoAccountRequired = try container.decodeIfPresent("demoAccountRequired") + notes = try container.decodeIfPresent("notes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(contactEmail, forKey: "contactEmail") + try container.encodeIfPresent(contactFirstName, forKey: "contactFirstName") + try container.encodeIfPresent(contactLastName, forKey: "contactLastName") + try container.encodeIfPresent(contactPhone, forKey: "contactPhone") + try container.encodeIfPresent(demoAccountName, forKey: "demoAccountName") + try container.encodeIfPresent(demoAccountPassword, forKey: "demoAccountPassword") + try container.encodeIfPresent(demoAccountRequired, forKey: "demoAccountRequired") + try container.encodeIfPresent(notes, forKey: "notes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.contactEmail == object.contactEmail else { return false } + guard self.contactFirstName == object.contactFirstName else { return false } + guard self.contactLastName == object.contactLastName else { return false } + guard self.contactPhone == object.contactPhone else { return false } + guard self.demoAccountName == object.demoAccountName else { return false } + guard self.demoAccountPassword == object.demoAccountPassword else { return false } + guard self.demoAccountRequired == object.demoAccountRequired else { return false } + guard self.notes == object.notes else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, type: `Type`, attributes: Attributes? = nil) { + self.relationships = relationships + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreReviewDetailCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreReviewDetailCreateRequest, rhs: AppStoreReviewDetailCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetailResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetailResponse.swift new file mode 100644 index 000000000..9fa39b890 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetailResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreReviewDetailResponse: APIModel { + + public var data: AppStoreReviewDetail + + public var links: DocumentLinks + + public var included: [AppStoreReviewAttachment]? + + public init(data: AppStoreReviewDetail, links: DocumentLinks, included: [AppStoreReviewAttachment]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreReviewDetailResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: AppStoreReviewDetailResponse, rhs: AppStoreReviewDetailResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetailUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetailUpdateRequest.swift new file mode 100644 index 000000000..120a2b0b7 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetailUpdateRequest.swift @@ -0,0 +1,157 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreReviewDetailUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreReviewDetails = "appStoreReviewDetails" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var contactEmail: String? + + public var contactFirstName: String? + + public var contactLastName: String? + + public var contactPhone: String? + + public var demoAccountName: String? + + public var demoAccountPassword: String? + + public var demoAccountRequired: Bool? + + public var notes: String? + + public init(contactEmail: String? = nil, contactFirstName: String? = nil, contactLastName: String? = nil, contactPhone: String? = nil, demoAccountName: String? = nil, demoAccountPassword: String? = nil, demoAccountRequired: Bool? = nil, notes: String? = nil) { + self.contactEmail = contactEmail + self.contactFirstName = contactFirstName + self.contactLastName = contactLastName + self.contactPhone = contactPhone + self.demoAccountName = demoAccountName + self.demoAccountPassword = demoAccountPassword + self.demoAccountRequired = demoAccountRequired + self.notes = notes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + contactEmail = try container.decodeIfPresent("contactEmail") + contactFirstName = try container.decodeIfPresent("contactFirstName") + contactLastName = try container.decodeIfPresent("contactLastName") + contactPhone = try container.decodeIfPresent("contactPhone") + demoAccountName = try container.decodeIfPresent("demoAccountName") + demoAccountPassword = try container.decodeIfPresent("demoAccountPassword") + demoAccountRequired = try container.decodeIfPresent("demoAccountRequired") + notes = try container.decodeIfPresent("notes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(contactEmail, forKey: "contactEmail") + try container.encodeIfPresent(contactFirstName, forKey: "contactFirstName") + try container.encodeIfPresent(contactLastName, forKey: "contactLastName") + try container.encodeIfPresent(contactPhone, forKey: "contactPhone") + try container.encodeIfPresent(demoAccountName, forKey: "demoAccountName") + try container.encodeIfPresent(demoAccountPassword, forKey: "demoAccountPassword") + try container.encodeIfPresent(demoAccountRequired, forKey: "demoAccountRequired") + try container.encodeIfPresent(notes, forKey: "notes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.contactEmail == object.contactEmail else { return false } + guard self.contactFirstName == object.contactFirstName else { return false } + guard self.contactLastName == object.contactLastName else { return false } + guard self.contactPhone == object.contactPhone else { return false } + guard self.demoAccountName == object.demoAccountName else { return false } + guard self.demoAccountPassword == object.demoAccountPassword else { return false } + guard self.demoAccountRequired == object.demoAccountRequired else { return false } + guard self.notes == object.notes else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreReviewDetailUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreReviewDetailUpdateRequest, rhs: AppStoreReviewDetailUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersion.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersion.swift new file mode 100644 index 000000000..64684cbf7 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersion.swift @@ -0,0 +1,1270 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersion: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public enum ReleaseType: String, Codable, Equatable, CaseIterable { + case manual = "MANUAL" + case afterApproval = "AFTER_APPROVAL" + case scheduled = "SCHEDULED" + } + + public var appStoreState: AppStoreVersionState? + + public var copyright: String? + + public var createdDate: DateTime? + + public var downloadable: Bool? + + public var earliestReleaseDate: DateTime? + + public var platform: Platform? + + public var releaseType: ReleaseType? + + public var usesIdfa: Bool? + + public var versionString: String? + + public init(appStoreState: AppStoreVersionState? = nil, copyright: String? = nil, createdDate: DateTime? = nil, downloadable: Bool? = nil, earliestReleaseDate: DateTime? = nil, platform: Platform? = nil, releaseType: ReleaseType? = nil, usesIdfa: Bool? = nil, versionString: String? = nil) { + self.appStoreState = appStoreState + self.copyright = copyright + self.createdDate = createdDate + self.downloadable = downloadable + self.earliestReleaseDate = earliestReleaseDate + self.platform = platform + self.releaseType = releaseType + self.usesIdfa = usesIdfa + self.versionString = versionString + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreState = try container.decodeIfPresent("appStoreState") + copyright = try container.decodeIfPresent("copyright") + createdDate = try container.decodeIfPresent("createdDate") + downloadable = try container.decodeIfPresent("downloadable") + earliestReleaseDate = try container.decodeIfPresent("earliestReleaseDate") + platform = try container.decodeIfPresent("platform") + releaseType = try container.decodeIfPresent("releaseType") + usesIdfa = try container.decodeIfPresent("usesIdfa") + versionString = try container.decodeIfPresent("versionString") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appStoreState, forKey: "appStoreState") + try container.encodeIfPresent(copyright, forKey: "copyright") + try container.encodeIfPresent(createdDate, forKey: "createdDate") + try container.encodeIfPresent(downloadable, forKey: "downloadable") + try container.encodeIfPresent(earliestReleaseDate, forKey: "earliestReleaseDate") + try container.encodeIfPresent(platform, forKey: "platform") + try container.encodeIfPresent(releaseType, forKey: "releaseType") + try container.encodeIfPresent(usesIdfa, forKey: "usesIdfa") + try container.encodeIfPresent(versionString, forKey: "versionString") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.appStoreState == object.appStoreState else { return false } + guard self.copyright == object.copyright else { return false } + guard self.createdDate == object.createdDate else { return false } + guard self.downloadable == object.downloadable else { return false } + guard self.earliestReleaseDate == object.earliestReleaseDate else { return false } + guard self.platform == object.platform else { return false } + guard self.releaseType == object.releaseType else { return false } + guard self.usesIdfa == object.usesIdfa else { return false } + guard self.versionString == object.versionString else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var ageRatingDeclaration: AgeRatingDeclaration? + + public var app: App? + + public var appStoreReviewDetail: AppStoreReviewDetail? + + public var appStoreVersionLocalizations: AppStoreVersionLocalizations? + + public var appStoreVersionPhasedRelease: AppStoreVersionPhasedRelease? + + public var appStoreVersionSubmission: AppStoreVersionSubmission? + + public var build: Build? + + public var idfaDeclaration: IdfaDeclaration? + + public var routingAppCoverage: RoutingAppCoverage? + + public class AgeRatingDeclaration: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case ageRatingDeclarations = "ageRatingDeclarations" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AgeRatingDeclaration else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AgeRatingDeclaration, rhs: AgeRatingDeclaration) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class App: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class AppStoreReviewDetail: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreReviewDetails = "appStoreReviewDetails" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreReviewDetail else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreReviewDetail, rhs: AppStoreReviewDetail) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class AppStoreVersionLocalizations: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionLocalizations else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppStoreVersionLocalizations, rhs: AppStoreVersionLocalizations) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class AppStoreVersionPhasedRelease: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionPhasedReleases = "appStoreVersionPhasedReleases" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionPhasedRelease else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreVersionPhasedRelease, rhs: AppStoreVersionPhasedRelease) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class AppStoreVersionSubmission: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionSubmissions = "appStoreVersionSubmissions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionSubmission else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreVersionSubmission, rhs: AppStoreVersionSubmission) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Build: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Build else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: Build, rhs: Build) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class IdfaDeclaration: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case idfaDeclarations = "idfaDeclarations" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? IdfaDeclaration else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: IdfaDeclaration, rhs: IdfaDeclaration) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class RoutingAppCoverage: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case routingAppCoverages = "routingAppCoverages" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? RoutingAppCoverage else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: RoutingAppCoverage, rhs: RoutingAppCoverage) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(ageRatingDeclaration: AgeRatingDeclaration? = nil, app: App? = nil, appStoreReviewDetail: AppStoreReviewDetail? = nil, appStoreVersionLocalizations: AppStoreVersionLocalizations? = nil, appStoreVersionPhasedRelease: AppStoreVersionPhasedRelease? = nil, appStoreVersionSubmission: AppStoreVersionSubmission? = nil, build: Build? = nil, idfaDeclaration: IdfaDeclaration? = nil, routingAppCoverage: RoutingAppCoverage? = nil) { + self.ageRatingDeclaration = ageRatingDeclaration + self.app = app + self.appStoreReviewDetail = appStoreReviewDetail + self.appStoreVersionLocalizations = appStoreVersionLocalizations + self.appStoreVersionPhasedRelease = appStoreVersionPhasedRelease + self.appStoreVersionSubmission = appStoreVersionSubmission + self.build = build + self.idfaDeclaration = idfaDeclaration + self.routingAppCoverage = routingAppCoverage + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + ageRatingDeclaration = try container.decodeIfPresent("ageRatingDeclaration") + app = try container.decodeIfPresent("app") + appStoreReviewDetail = try container.decodeIfPresent("appStoreReviewDetail") + appStoreVersionLocalizations = try container.decodeIfPresent("appStoreVersionLocalizations") + appStoreVersionPhasedRelease = try container.decodeIfPresent("appStoreVersionPhasedRelease") + appStoreVersionSubmission = try container.decodeIfPresent("appStoreVersionSubmission") + build = try container.decodeIfPresent("build") + idfaDeclaration = try container.decodeIfPresent("idfaDeclaration") + routingAppCoverage = try container.decodeIfPresent("routingAppCoverage") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(ageRatingDeclaration, forKey: "ageRatingDeclaration") + try container.encodeIfPresent(app, forKey: "app") + try container.encodeIfPresent(appStoreReviewDetail, forKey: "appStoreReviewDetail") + try container.encodeIfPresent(appStoreVersionLocalizations, forKey: "appStoreVersionLocalizations") + try container.encodeIfPresent(appStoreVersionPhasedRelease, forKey: "appStoreVersionPhasedRelease") + try container.encodeIfPresent(appStoreVersionSubmission, forKey: "appStoreVersionSubmission") + try container.encodeIfPresent(build, forKey: "build") + try container.encodeIfPresent(idfaDeclaration, forKey: "idfaDeclaration") + try container.encodeIfPresent(routingAppCoverage, forKey: "routingAppCoverage") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.ageRatingDeclaration == object.ageRatingDeclaration else { return false } + guard self.app == object.app else { return false } + guard self.appStoreReviewDetail == object.appStoreReviewDetail else { return false } + guard self.appStoreVersionLocalizations == object.appStoreVersionLocalizations else { return false } + guard self.appStoreVersionPhasedRelease == object.appStoreVersionPhasedRelease else { return false } + guard self.appStoreVersionSubmission == object.appStoreVersionSubmission else { return false } + guard self.build == object.build else { return false } + guard self.idfaDeclaration == object.idfaDeclaration else { return false } + guard self.routingAppCoverage == object.routingAppCoverage else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersion else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppStoreVersion, rhs: AppStoreVersion) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionBuildLinkageRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionBuildLinkageRequest.swift new file mode 100644 index 000000000..823338eaf --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionBuildLinkageRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionBuildLinkageRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionBuildLinkageRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersionBuildLinkageRequest, rhs: AppStoreVersionBuildLinkageRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionBuildLinkageResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionBuildLinkageResponse.swift new file mode 100644 index 000000000..fe6295017 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionBuildLinkageResponse.swift @@ -0,0 +1,84 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionBuildLinkageResponse: APIModel { + + public var data: DataType + + public var links: DocumentLinks + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionBuildLinkageResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreVersionBuildLinkageResponse, rhs: AppStoreVersionBuildLinkageResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionCreateRequest.swift new file mode 100644 index 000000000..5b9af0877 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionCreateRequest.swift @@ -0,0 +1,332 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var app: App + + public var build: Build? + + public class App: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Build: APIModel { + + public var data: DataType? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Build else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: Build, rhs: Build) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App, build: Build? = nil) { + self.app = app + self.build = build + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decode("app") + build = try container.decodeIfPresent("build") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(app, forKey: "app") + try container.encodeIfPresent(build, forKey: "build") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + guard self.build == object.build else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public enum ReleaseType: String, Codable, Equatable, CaseIterable { + case manual = "MANUAL" + case afterApproval = "AFTER_APPROVAL" + case scheduled = "SCHEDULED" + } + + public var versionString: String + + public var platform: Platform + + public var copyright: String? + + public var earliestReleaseDate: DateTime? + + public var releaseType: ReleaseType? + + public var usesIdfa: Bool? + + public init(versionString: String, platform: Platform, copyright: String? = nil, earliestReleaseDate: DateTime? = nil, releaseType: ReleaseType? = nil, usesIdfa: Bool? = nil) { + self.versionString = versionString + self.platform = platform + self.copyright = copyright + self.earliestReleaseDate = earliestReleaseDate + self.releaseType = releaseType + self.usesIdfa = usesIdfa + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + versionString = try container.decode("versionString") + platform = try container.decode("platform") + copyright = try container.decodeIfPresent("copyright") + earliestReleaseDate = try container.decodeIfPresent("earliestReleaseDate") + releaseType = try container.decodeIfPresent("releaseType") + usesIdfa = try container.decodeIfPresent("usesIdfa") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(versionString, forKey: "versionString") + try container.encode(platform, forKey: "platform") + try container.encodeIfPresent(copyright, forKey: "copyright") + try container.encodeIfPresent(earliestReleaseDate, forKey: "earliestReleaseDate") + try container.encodeIfPresent(releaseType, forKey: "releaseType") + try container.encodeIfPresent(usesIdfa, forKey: "usesIdfa") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.versionString == object.versionString else { return false } + guard self.platform == object.platform else { return false } + guard self.copyright == object.copyright else { return false } + guard self.earliestReleaseDate == object.earliestReleaseDate else { return false } + guard self.releaseType == object.releaseType else { return false } + guard self.usesIdfa == object.usesIdfa else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersionCreateRequest, rhs: AppStoreVersionCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalization.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalization.swift new file mode 100644 index 000000000..d353abc44 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalization.swift @@ -0,0 +1,532 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionLocalization: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var description: String? + + public var keywords: String? + + public var locale: String? + + public var marketingUrl: URL? + + public var promotionalText: String? + + public var supportUrl: URL? + + public var whatsNew: String? + + public init(description: String? = nil, keywords: String? = nil, locale: String? = nil, marketingUrl: URL? = nil, promotionalText: String? = nil, supportUrl: URL? = nil, whatsNew: String? = nil) { + self.description = description + self.keywords = keywords + self.locale = locale + self.marketingUrl = marketingUrl + self.promotionalText = promotionalText + self.supportUrl = supportUrl + self.whatsNew = whatsNew + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + description = try container.decodeIfPresent("description") + keywords = try container.decodeIfPresent("keywords") + locale = try container.decodeIfPresent("locale") + marketingUrl = try container.decodeIfPresent("marketingUrl") + promotionalText = try container.decodeIfPresent("promotionalText") + supportUrl = try container.decodeIfPresent("supportUrl") + whatsNew = try container.decodeIfPresent("whatsNew") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(description, forKey: "description") + try container.encodeIfPresent(keywords, forKey: "keywords") + try container.encodeIfPresent(locale, forKey: "locale") + try container.encodeIfPresent(marketingUrl, forKey: "marketingUrl") + try container.encodeIfPresent(promotionalText, forKey: "promotionalText") + try container.encodeIfPresent(supportUrl, forKey: "supportUrl") + try container.encodeIfPresent(whatsNew, forKey: "whatsNew") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.description == object.description else { return false } + guard self.keywords == object.keywords else { return false } + guard self.locale == object.locale else { return false } + guard self.marketingUrl == object.marketingUrl else { return false } + guard self.promotionalText == object.promotionalText else { return false } + guard self.supportUrl == object.supportUrl else { return false } + guard self.whatsNew == object.whatsNew else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var appPreviewSets: AppPreviewSets? + + public var appScreenshotSets: AppScreenshotSets? + + public var appStoreVersion: AppStoreVersion? + + public class AppPreviewSets: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPreviewSets = "appPreviewSets" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppPreviewSets else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppPreviewSets, rhs: AppPreviewSets) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class AppScreenshotSets: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appScreenshotSets = "appScreenshotSets" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppScreenshotSets else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppScreenshotSets, rhs: AppScreenshotSets) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class AppStoreVersion: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersion else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreVersion, rhs: AppStoreVersion) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appPreviewSets: AppPreviewSets? = nil, appScreenshotSets: AppScreenshotSets? = nil, appStoreVersion: AppStoreVersion? = nil) { + self.appPreviewSets = appPreviewSets + self.appScreenshotSets = appScreenshotSets + self.appStoreVersion = appStoreVersion + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appPreviewSets = try container.decodeIfPresent("appPreviewSets") + appScreenshotSets = try container.decodeIfPresent("appScreenshotSets") + appStoreVersion = try container.decodeIfPresent("appStoreVersion") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appPreviewSets, forKey: "appPreviewSets") + try container.encodeIfPresent(appScreenshotSets, forKey: "appScreenshotSets") + try container.encodeIfPresent(appStoreVersion, forKey: "appStoreVersion") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appPreviewSets == object.appPreviewSets else { return false } + guard self.appScreenshotSets == object.appScreenshotSets else { return false } + guard self.appStoreVersion == object.appStoreVersion else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionLocalization else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppStoreVersionLocalization, rhs: AppStoreVersionLocalization) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationCreateRequest.swift new file mode 100644 index 000000000..02709db1f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationCreateRequest.swift @@ -0,0 +1,254 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionLocalizationCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var appStoreVersion: AppStoreVersion + + public class AppStoreVersion: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersion else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersion, rhs: AppStoreVersion) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appStoreVersion: AppStoreVersion) { + self.appStoreVersion = appStoreVersion + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreVersion = try container.decode("appStoreVersion") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(appStoreVersion, forKey: "appStoreVersion") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appStoreVersion == object.appStoreVersion else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var locale: String + + public var description: String? + + public var keywords: String? + + public var marketingUrl: URL? + + public var promotionalText: String? + + public var supportUrl: URL? + + public var whatsNew: String? + + public init(locale: String, description: String? = nil, keywords: String? = nil, marketingUrl: URL? = nil, promotionalText: String? = nil, supportUrl: URL? = nil, whatsNew: String? = nil) { + self.locale = locale + self.description = description + self.keywords = keywords + self.marketingUrl = marketingUrl + self.promotionalText = promotionalText + self.supportUrl = supportUrl + self.whatsNew = whatsNew + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + locale = try container.decode("locale") + description = try container.decodeIfPresent("description") + keywords = try container.decodeIfPresent("keywords") + marketingUrl = try container.decodeIfPresent("marketingUrl") + promotionalText = try container.decodeIfPresent("promotionalText") + supportUrl = try container.decodeIfPresent("supportUrl") + whatsNew = try container.decodeIfPresent("whatsNew") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(locale, forKey: "locale") + try container.encodeIfPresent(description, forKey: "description") + try container.encodeIfPresent(keywords, forKey: "keywords") + try container.encodeIfPresent(marketingUrl, forKey: "marketingUrl") + try container.encodeIfPresent(promotionalText, forKey: "promotionalText") + try container.encodeIfPresent(supportUrl, forKey: "supportUrl") + try container.encodeIfPresent(whatsNew, forKey: "whatsNew") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.locale == object.locale else { return false } + guard self.description == object.description else { return false } + guard self.keywords == object.keywords else { return false } + guard self.marketingUrl == object.marketingUrl else { return false } + guard self.promotionalText == object.promotionalText else { return false } + guard self.supportUrl == object.supportUrl else { return false } + guard self.whatsNew == object.whatsNew else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionLocalizationCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersionLocalizationCreateRequest, rhs: AppStoreVersionLocalizationCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationResponse.swift new file mode 100644 index 000000000..5b9acdab8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionLocalizationResponse: APIModel { + + public var data: AppStoreVersionLocalization + + public var links: DocumentLinks + + public var included: [Included]? + + public init(data: AppStoreVersionLocalization, links: DocumentLinks, included: [Included]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionLocalizationResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: AppStoreVersionLocalizationResponse, rhs: AppStoreVersionLocalizationResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationUpdateRequest.swift new file mode 100644 index 000000000..648e8c380 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationUpdateRequest.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionLocalizationUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var description: String? + + public var keywords: String? + + public var marketingUrl: URL? + + public var promotionalText: String? + + public var supportUrl: URL? + + public var whatsNew: String? + + public init(description: String? = nil, keywords: String? = nil, marketingUrl: URL? = nil, promotionalText: String? = nil, supportUrl: URL? = nil, whatsNew: String? = nil) { + self.description = description + self.keywords = keywords + self.marketingUrl = marketingUrl + self.promotionalText = promotionalText + self.supportUrl = supportUrl + self.whatsNew = whatsNew + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + description = try container.decodeIfPresent("description") + keywords = try container.decodeIfPresent("keywords") + marketingUrl = try container.decodeIfPresent("marketingUrl") + promotionalText = try container.decodeIfPresent("promotionalText") + supportUrl = try container.decodeIfPresent("supportUrl") + whatsNew = try container.decodeIfPresent("whatsNew") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(description, forKey: "description") + try container.encodeIfPresent(keywords, forKey: "keywords") + try container.encodeIfPresent(marketingUrl, forKey: "marketingUrl") + try container.encodeIfPresent(promotionalText, forKey: "promotionalText") + try container.encodeIfPresent(supportUrl, forKey: "supportUrl") + try container.encodeIfPresent(whatsNew, forKey: "whatsNew") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.description == object.description else { return false } + guard self.keywords == object.keywords else { return false } + guard self.marketingUrl == object.marketingUrl else { return false } + guard self.promotionalText == object.promotionalText else { return false } + guard self.supportUrl == object.supportUrl else { return false } + guard self.whatsNew == object.whatsNew else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionLocalizationUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersionLocalizationUpdateRequest, rhs: AppStoreVersionLocalizationUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationsResponse.swift new file mode 100644 index 000000000..41c66c67f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalizationsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionLocalizationsResponse: APIModel { + + public var data: [AppStoreVersionLocalization] + + public var links: PagedDocumentLinks + + public var included: [Included]? + + public var meta: PagingInformation? + + public init(data: [AppStoreVersionLocalization], links: PagedDocumentLinks, included: [Included]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionLocalizationsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppStoreVersionLocalizationsResponse, rhs: AppStoreVersionLocalizationsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedRelease.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedRelease.swift new file mode 100644 index 000000000..a08c68080 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedRelease.swift @@ -0,0 +1,108 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionPhasedRelease: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionPhasedReleases = "appStoreVersionPhasedReleases" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var currentDayNumber: Int? + + public var phasedReleaseState: PhasedReleaseState? + + public var startDate: DateTime? + + public var totalPauseDuration: Int? + + public init(currentDayNumber: Int? = nil, phasedReleaseState: PhasedReleaseState? = nil, startDate: DateTime? = nil, totalPauseDuration: Int? = nil) { + self.currentDayNumber = currentDayNumber + self.phasedReleaseState = phasedReleaseState + self.startDate = startDate + self.totalPauseDuration = totalPauseDuration + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + currentDayNumber = try container.decodeIfPresent("currentDayNumber") + phasedReleaseState = try container.decodeIfPresent("phasedReleaseState") + startDate = try container.decodeIfPresent("startDate") + totalPauseDuration = try container.decodeIfPresent("totalPauseDuration") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(currentDayNumber, forKey: "currentDayNumber") + try container.encodeIfPresent(phasedReleaseState, forKey: "phasedReleaseState") + try container.encodeIfPresent(startDate, forKey: "startDate") + try container.encodeIfPresent(totalPauseDuration, forKey: "totalPauseDuration") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.currentDayNumber == object.currentDayNumber else { return false } + guard self.phasedReleaseState == object.phasedReleaseState else { return false } + guard self.startDate == object.startDate else { return false } + guard self.totalPauseDuration == object.totalPauseDuration else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionPhasedRelease else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: AppStoreVersionPhasedRelease, rhs: AppStoreVersionPhasedRelease) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedReleaseCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedReleaseCreateRequest.swift new file mode 100644 index 000000000..276b30339 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedReleaseCreateRequest.swift @@ -0,0 +1,218 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionPhasedReleaseCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionPhasedReleases = "appStoreVersionPhasedReleases" + } + + public var relationships: Relationships + + public var type: `Type` + + public var attributes: Attributes? + + public class Relationships: APIModel { + + public var appStoreVersion: AppStoreVersion + + public class AppStoreVersion: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersion else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersion, rhs: AppStoreVersion) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appStoreVersion: AppStoreVersion) { + self.appStoreVersion = appStoreVersion + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreVersion = try container.decode("appStoreVersion") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(appStoreVersion, forKey: "appStoreVersion") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appStoreVersion == object.appStoreVersion else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var phasedReleaseState: PhasedReleaseState? + + public init(phasedReleaseState: PhasedReleaseState? = nil) { + self.phasedReleaseState = phasedReleaseState + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + phasedReleaseState = try container.decodeIfPresent("phasedReleaseState") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(phasedReleaseState, forKey: "phasedReleaseState") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.phasedReleaseState == object.phasedReleaseState else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, type: `Type`, attributes: Attributes? = nil) { + self.relationships = relationships + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionPhasedReleaseCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersionPhasedReleaseCreateRequest, rhs: AppStoreVersionPhasedReleaseCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedReleaseResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedReleaseResponse.swift new file mode 100644 index 000000000..7156e8c24 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedReleaseResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionPhasedReleaseResponse: APIModel { + + public var data: AppStoreVersionPhasedRelease + + public var links: DocumentLinks + + public init(data: AppStoreVersionPhasedRelease, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionPhasedReleaseResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreVersionPhasedReleaseResponse, rhs: AppStoreVersionPhasedReleaseResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedReleaseUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedReleaseUpdateRequest.swift new file mode 100644 index 000000000..157275b59 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionPhasedReleaseUpdateRequest.swift @@ -0,0 +1,115 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionPhasedReleaseUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionPhasedReleases = "appStoreVersionPhasedReleases" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var phasedReleaseState: PhasedReleaseState? + + public init(phasedReleaseState: PhasedReleaseState? = nil) { + self.phasedReleaseState = phasedReleaseState + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + phasedReleaseState = try container.decodeIfPresent("phasedReleaseState") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(phasedReleaseState, forKey: "phasedReleaseState") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.phasedReleaseState == object.phasedReleaseState else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionPhasedReleaseUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersionPhasedReleaseUpdateRequest, rhs: AppStoreVersionPhasedReleaseUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionResponse.swift new file mode 100644 index 000000000..c56a9cb44 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionResponse: APIModel { + + public var data: AppStoreVersion + + public var links: DocumentLinks + + public var included: [Included]? + + public init(data: AppStoreVersion, links: DocumentLinks, included: [Included]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: AppStoreVersionResponse, rhs: AppStoreVersionResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionState.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionState.swift new file mode 100644 index 000000000..49ee35e0e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionState.swift @@ -0,0 +1,26 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum AppStoreVersionState: String, Codable, Equatable, CaseIterable { + case developerRemovedFromSale = "DEVELOPER_REMOVED_FROM_SALE" + case developerRejected = "DEVELOPER_REJECTED" + case inReview = "IN_REVIEW" + case invalidBinary = "INVALID_BINARY" + case metadataRejected = "METADATA_REJECTED" + case pendingAppleRelease = "PENDING_APPLE_RELEASE" + case pendingContract = "PENDING_CONTRACT" + case pendingDeveloperRelease = "PENDING_DEVELOPER_RELEASE" + case prepareForSubmission = "PREPARE_FOR_SUBMISSION" + case preorderReadyForSale = "PREORDER_READY_FOR_SALE" + case processingForAppStore = "PROCESSING_FOR_APP_STORE" + case readyForSale = "READY_FOR_SALE" + case rejected = "REJECTED" + case removedFromSale = "REMOVED_FROM_SALE" + case waitingForExportCompliance = "WAITING_FOR_EXPORT_COMPLIANCE" + case waitingForReview = "WAITING_FOR_REVIEW" + case replacedWithNewVersion = "REPLACED_WITH_NEW_VERSION" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmission.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmission.swift new file mode 100644 index 000000000..533167e76 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmission.swift @@ -0,0 +1,205 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionSubmission: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionSubmissions = "appStoreVersionSubmissions" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var relationships: Relationships? + + public class Relationships: APIModel { + + public var appStoreVersion: AppStoreVersion? + + public class AppStoreVersion: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersion else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreVersion, rhs: AppStoreVersion) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appStoreVersion: AppStoreVersion? = nil) { + self.appStoreVersion = appStoreVersion + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreVersion = try container.decodeIfPresent("appStoreVersion") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appStoreVersion, forKey: "appStoreVersion") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appStoreVersion == object.appStoreVersion else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionSubmission else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: AppStoreVersionSubmission, rhs: AppStoreVersionSubmission) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmissionCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmissionCreateRequest.swift new file mode 100644 index 000000000..36f78db36 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmissionCreateRequest.swift @@ -0,0 +1,181 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionSubmissionCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersionSubmissions = "appStoreVersionSubmissions" + } + + public var relationships: Relationships + + public var type: `Type` + + public class Relationships: APIModel { + + public var appStoreVersion: AppStoreVersion + + public class AppStoreVersion: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersion else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersion, rhs: AppStoreVersion) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appStoreVersion: AppStoreVersion) { + self.appStoreVersion = appStoreVersion + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreVersion = try container.decode("appStoreVersion") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(appStoreVersion, forKey: "appStoreVersion") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appStoreVersion == object.appStoreVersion else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, type: `Type`) { + self.relationships = relationships + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionSubmissionCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersionSubmissionCreateRequest, rhs: AppStoreVersionSubmissionCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmissionResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmissionResponse.swift new file mode 100644 index 000000000..64a1ae5a5 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmissionResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionSubmissionResponse: APIModel { + + public var data: AppStoreVersionSubmission + + public var links: DocumentLinks + + public init(data: AppStoreVersionSubmission, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionSubmissionResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreVersionSubmissionResponse, rhs: AppStoreVersionSubmissionResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionUpdateRequest.swift new file mode 100644 index 000000000..a1c4cfc17 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionUpdateRequest.swift @@ -0,0 +1,260 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public enum ReleaseType: String, Codable, Equatable, CaseIterable { + case manual = "MANUAL" + case afterApproval = "AFTER_APPROVAL" + case scheduled = "SCHEDULED" + } + + public var copyright: String? + + public var downloadable: Bool? + + public var earliestReleaseDate: DateTime? + + public var releaseType: ReleaseType? + + public var usesIdfa: Bool? + + public var versionString: String? + + public init(copyright: String? = nil, downloadable: Bool? = nil, earliestReleaseDate: DateTime? = nil, releaseType: ReleaseType? = nil, usesIdfa: Bool? = nil, versionString: String? = nil) { + self.copyright = copyright + self.downloadable = downloadable + self.earliestReleaseDate = earliestReleaseDate + self.releaseType = releaseType + self.usesIdfa = usesIdfa + self.versionString = versionString + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + copyright = try container.decodeIfPresent("copyright") + downloadable = try container.decodeIfPresent("downloadable") + earliestReleaseDate = try container.decodeIfPresent("earliestReleaseDate") + releaseType = try container.decodeIfPresent("releaseType") + usesIdfa = try container.decodeIfPresent("usesIdfa") + versionString = try container.decodeIfPresent("versionString") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(copyright, forKey: "copyright") + try container.encodeIfPresent(downloadable, forKey: "downloadable") + try container.encodeIfPresent(earliestReleaseDate, forKey: "earliestReleaseDate") + try container.encodeIfPresent(releaseType, forKey: "releaseType") + try container.encodeIfPresent(usesIdfa, forKey: "usesIdfa") + try container.encodeIfPresent(versionString, forKey: "versionString") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.copyright == object.copyright else { return false } + guard self.downloadable == object.downloadable else { return false } + guard self.earliestReleaseDate == object.earliestReleaseDate else { return false } + guard self.releaseType == object.releaseType else { return false } + guard self.usesIdfa == object.usesIdfa else { return false } + guard self.versionString == object.versionString else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var build: Build? + + public class Build: APIModel { + + public var data: DataType? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Build else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: Build, rhs: Build) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(build: Build? = nil) { + self.build = build + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + build = try container.decodeIfPresent("build") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(build, forKey: "build") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.build == object.build else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersionUpdateRequest, rhs: AppStoreVersionUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionsResponse.swift new file mode 100644 index 000000000..126604553 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppStoreVersionsResponse: APIModel { + + public var data: [AppStoreVersion] + + public var links: PagedDocumentLinks + + public var included: [Included]? + + public var meta: PagingInformation? + + public init(data: [AppStoreVersion], links: PagedDocumentLinks, included: [Included]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersionsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppStoreVersionsResponse, rhs: AppStoreVersionsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppUpdateRequest.swift new file mode 100644 index 000000000..7baaee671 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppUpdateRequest.swift @@ -0,0 +1,325 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public enum ContentRightsDeclaration: String, Codable, Equatable, CaseIterable { + case doesNotUseThirdPartyContent = "DOES_NOT_USE_THIRD_PARTY_CONTENT" + case usesThirdPartyContent = "USES_THIRD_PARTY_CONTENT" + } + + public var availableInNewTerritories: Bool? + + public var bundleId: String? + + public var contentRightsDeclaration: ContentRightsDeclaration? + + public var primaryLocale: String? + + public init(availableInNewTerritories: Bool? = nil, bundleId: String? = nil, contentRightsDeclaration: ContentRightsDeclaration? = nil, primaryLocale: String? = nil) { + self.availableInNewTerritories = availableInNewTerritories + self.bundleId = bundleId + self.contentRightsDeclaration = contentRightsDeclaration + self.primaryLocale = primaryLocale + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + availableInNewTerritories = try container.decodeIfPresent("availableInNewTerritories") + bundleId = try container.decodeIfPresent("bundleId") + contentRightsDeclaration = try container.decodeIfPresent("contentRightsDeclaration") + primaryLocale = try container.decodeIfPresent("primaryLocale") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(availableInNewTerritories, forKey: "availableInNewTerritories") + try container.encodeIfPresent(bundleId, forKey: "bundleId") + try container.encodeIfPresent(contentRightsDeclaration, forKey: "contentRightsDeclaration") + try container.encodeIfPresent(primaryLocale, forKey: "primaryLocale") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.availableInNewTerritories == object.availableInNewTerritories else { return false } + guard self.bundleId == object.bundleId else { return false } + guard self.contentRightsDeclaration == object.contentRightsDeclaration else { return false } + guard self.primaryLocale == object.primaryLocale else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var availableTerritories: AvailableTerritories? + + public var prices: Prices? + + public class AvailableTerritories: APIModel { + + public var data: [DataType]? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case territories = "territories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AvailableTerritories else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AvailableTerritories, rhs: AvailableTerritories) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Prices: APIModel { + + public var data: [DataType]? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appPrices = "appPrices" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Prices else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: Prices, rhs: Prices) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(availableTerritories: AvailableTerritories? = nil, prices: Prices? = nil) { + self.availableTerritories = availableTerritories + self.prices = prices + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + availableTerritories = try container.decodeIfPresent("availableTerritories") + prices = try container.decodeIfPresent("prices") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(availableTerritories, forKey: "availableTerritories") + try container.encodeIfPresent(prices, forKey: "prices") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.availableTerritories == object.availableTerritories else { return false } + guard self.prices == object.prices else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppUpdateRequest, rhs: AppUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppsResponse.swift new file mode 100644 index 000000000..cf1f92513 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class AppsResponse: APIModel { + + public var data: [App] + + public var links: PagedDocumentLinks + + public var included: [Included]? + + public var meta: PagingInformation? + + public init(data: [App], links: PagedDocumentLinks, included: [Included]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: AppsResponse, rhs: AppsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalization.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalization.swift new file mode 100644 index 000000000..0fa84db44 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalization.swift @@ -0,0 +1,272 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaAppLocalization: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaAppLocalizations = "betaAppLocalizations" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var description: String? + + public var feedbackEmail: String? + + public var locale: String? + + public var marketingUrl: String? + + public var privacyPolicyUrl: String? + + public var tvOsPrivacyPolicy: String? + + public init(description: String? = nil, feedbackEmail: String? = nil, locale: String? = nil, marketingUrl: String? = nil, privacyPolicyUrl: String? = nil, tvOsPrivacyPolicy: String? = nil) { + self.description = description + self.feedbackEmail = feedbackEmail + self.locale = locale + self.marketingUrl = marketingUrl + self.privacyPolicyUrl = privacyPolicyUrl + self.tvOsPrivacyPolicy = tvOsPrivacyPolicy + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + description = try container.decodeIfPresent("description") + feedbackEmail = try container.decodeIfPresent("feedbackEmail") + locale = try container.decodeIfPresent("locale") + marketingUrl = try container.decodeIfPresent("marketingUrl") + privacyPolicyUrl = try container.decodeIfPresent("privacyPolicyUrl") + tvOsPrivacyPolicy = try container.decodeIfPresent("tvOsPrivacyPolicy") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(description, forKey: "description") + try container.encodeIfPresent(feedbackEmail, forKey: "feedbackEmail") + try container.encodeIfPresent(locale, forKey: "locale") + try container.encodeIfPresent(marketingUrl, forKey: "marketingUrl") + try container.encodeIfPresent(privacyPolicyUrl, forKey: "privacyPolicyUrl") + try container.encodeIfPresent(tvOsPrivacyPolicy, forKey: "tvOsPrivacyPolicy") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.description == object.description else { return false } + guard self.feedbackEmail == object.feedbackEmail else { return false } + guard self.locale == object.locale else { return false } + guard self.marketingUrl == object.marketingUrl else { return false } + guard self.privacyPolicyUrl == object.privacyPolicyUrl else { return false } + guard self.tvOsPrivacyPolicy == object.tvOsPrivacyPolicy else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var app: App? + + public class App: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App? = nil) { + self.app = app + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decodeIfPresent("app") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(app, forKey: "app") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppLocalization else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: BetaAppLocalization, rhs: BetaAppLocalization) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationCreateRequest.swift new file mode 100644 index 000000000..1ebac6416 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationCreateRequest.swift @@ -0,0 +1,248 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaAppLocalizationCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaAppLocalizations = "betaAppLocalizations" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var app: App + + public class App: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App) { + self.app = app + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decode("app") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(app, forKey: "app") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var locale: String + + public var description: String? + + public var feedbackEmail: String? + + public var marketingUrl: String? + + public var privacyPolicyUrl: String? + + public var tvOsPrivacyPolicy: String? + + public init(locale: String, description: String? = nil, feedbackEmail: String? = nil, marketingUrl: String? = nil, privacyPolicyUrl: String? = nil, tvOsPrivacyPolicy: String? = nil) { + self.locale = locale + self.description = description + self.feedbackEmail = feedbackEmail + self.marketingUrl = marketingUrl + self.privacyPolicyUrl = privacyPolicyUrl + self.tvOsPrivacyPolicy = tvOsPrivacyPolicy + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + locale = try container.decode("locale") + description = try container.decodeIfPresent("description") + feedbackEmail = try container.decodeIfPresent("feedbackEmail") + marketingUrl = try container.decodeIfPresent("marketingUrl") + privacyPolicyUrl = try container.decodeIfPresent("privacyPolicyUrl") + tvOsPrivacyPolicy = try container.decodeIfPresent("tvOsPrivacyPolicy") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(locale, forKey: "locale") + try container.encodeIfPresent(description, forKey: "description") + try container.encodeIfPresent(feedbackEmail, forKey: "feedbackEmail") + try container.encodeIfPresent(marketingUrl, forKey: "marketingUrl") + try container.encodeIfPresent(privacyPolicyUrl, forKey: "privacyPolicyUrl") + try container.encodeIfPresent(tvOsPrivacyPolicy, forKey: "tvOsPrivacyPolicy") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.locale == object.locale else { return false } + guard self.description == object.description else { return false } + guard self.feedbackEmail == object.feedbackEmail else { return false } + guard self.marketingUrl == object.marketingUrl else { return false } + guard self.privacyPolicyUrl == object.privacyPolicyUrl else { return false } + guard self.tvOsPrivacyPolicy == object.tvOsPrivacyPolicy else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppLocalizationCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaAppLocalizationCreateRequest, rhs: BetaAppLocalizationCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationResponse.swift new file mode 100644 index 000000000..bdb052aa3 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaAppLocalizationResponse: APIModel { + + public var data: BetaAppLocalization + + public var links: DocumentLinks + + public var included: [App]? + + public init(data: BetaAppLocalization, links: DocumentLinks, included: [App]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppLocalizationResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: BetaAppLocalizationResponse, rhs: BetaAppLocalizationResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationUpdateRequest.swift new file mode 100644 index 000000000..5c393b137 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationUpdateRequest.swift @@ -0,0 +1,139 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaAppLocalizationUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaAppLocalizations = "betaAppLocalizations" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var description: String? + + public var feedbackEmail: String? + + public var marketingUrl: String? + + public var privacyPolicyUrl: String? + + public var tvOsPrivacyPolicy: String? + + public init(description: String? = nil, feedbackEmail: String? = nil, marketingUrl: String? = nil, privacyPolicyUrl: String? = nil, tvOsPrivacyPolicy: String? = nil) { + self.description = description + self.feedbackEmail = feedbackEmail + self.marketingUrl = marketingUrl + self.privacyPolicyUrl = privacyPolicyUrl + self.tvOsPrivacyPolicy = tvOsPrivacyPolicy + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + description = try container.decodeIfPresent("description") + feedbackEmail = try container.decodeIfPresent("feedbackEmail") + marketingUrl = try container.decodeIfPresent("marketingUrl") + privacyPolicyUrl = try container.decodeIfPresent("privacyPolicyUrl") + tvOsPrivacyPolicy = try container.decodeIfPresent("tvOsPrivacyPolicy") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(description, forKey: "description") + try container.encodeIfPresent(feedbackEmail, forKey: "feedbackEmail") + try container.encodeIfPresent(marketingUrl, forKey: "marketingUrl") + try container.encodeIfPresent(privacyPolicyUrl, forKey: "privacyPolicyUrl") + try container.encodeIfPresent(tvOsPrivacyPolicy, forKey: "tvOsPrivacyPolicy") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.description == object.description else { return false } + guard self.feedbackEmail == object.feedbackEmail else { return false } + guard self.marketingUrl == object.marketingUrl else { return false } + guard self.privacyPolicyUrl == object.privacyPolicyUrl else { return false } + guard self.tvOsPrivacyPolicy == object.tvOsPrivacyPolicy else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppLocalizationUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaAppLocalizationUpdateRequest, rhs: BetaAppLocalizationUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationsResponse.swift new file mode 100644 index 000000000..32fd078a2 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalizationsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaAppLocalizationsResponse: APIModel { + + public var data: [BetaAppLocalization] + + public var links: PagedDocumentLinks + + public var included: [App]? + + public var meta: PagingInformation? + + public init(data: [BetaAppLocalization], links: PagedDocumentLinks, included: [App]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppLocalizationsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaAppLocalizationsResponse, rhs: BetaAppLocalizationsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetail.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetail.swift new file mode 100644 index 000000000..c7256fa14 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetail.swift @@ -0,0 +1,284 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaAppReviewDetail: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaAppReviewDetails = "betaAppReviewDetails" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var contactEmail: String? + + public var contactFirstName: String? + + public var contactLastName: String? + + public var contactPhone: String? + + public var demoAccountName: String? + + public var demoAccountPassword: String? + + public var demoAccountRequired: Bool? + + public var notes: String? + + public init(contactEmail: String? = nil, contactFirstName: String? = nil, contactLastName: String? = nil, contactPhone: String? = nil, demoAccountName: String? = nil, demoAccountPassword: String? = nil, demoAccountRequired: Bool? = nil, notes: String? = nil) { + self.contactEmail = contactEmail + self.contactFirstName = contactFirstName + self.contactLastName = contactLastName + self.contactPhone = contactPhone + self.demoAccountName = demoAccountName + self.demoAccountPassword = demoAccountPassword + self.demoAccountRequired = demoAccountRequired + self.notes = notes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + contactEmail = try container.decodeIfPresent("contactEmail") + contactFirstName = try container.decodeIfPresent("contactFirstName") + contactLastName = try container.decodeIfPresent("contactLastName") + contactPhone = try container.decodeIfPresent("contactPhone") + demoAccountName = try container.decodeIfPresent("demoAccountName") + demoAccountPassword = try container.decodeIfPresent("demoAccountPassword") + demoAccountRequired = try container.decodeIfPresent("demoAccountRequired") + notes = try container.decodeIfPresent("notes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(contactEmail, forKey: "contactEmail") + try container.encodeIfPresent(contactFirstName, forKey: "contactFirstName") + try container.encodeIfPresent(contactLastName, forKey: "contactLastName") + try container.encodeIfPresent(contactPhone, forKey: "contactPhone") + try container.encodeIfPresent(demoAccountName, forKey: "demoAccountName") + try container.encodeIfPresent(demoAccountPassword, forKey: "demoAccountPassword") + try container.encodeIfPresent(demoAccountRequired, forKey: "demoAccountRequired") + try container.encodeIfPresent(notes, forKey: "notes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.contactEmail == object.contactEmail else { return false } + guard self.contactFirstName == object.contactFirstName else { return false } + guard self.contactLastName == object.contactLastName else { return false } + guard self.contactPhone == object.contactPhone else { return false } + guard self.demoAccountName == object.demoAccountName else { return false } + guard self.demoAccountPassword == object.demoAccountPassword else { return false } + guard self.demoAccountRequired == object.demoAccountRequired else { return false } + guard self.notes == object.notes else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var app: App? + + public class App: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App? = nil) { + self.app = app + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decodeIfPresent("app") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(app, forKey: "app") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppReviewDetail else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: BetaAppReviewDetail, rhs: BetaAppReviewDetail) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetailResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetailResponse.swift new file mode 100644 index 000000000..31f51c784 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetailResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaAppReviewDetailResponse: APIModel { + + public var data: BetaAppReviewDetail + + public var links: DocumentLinks + + public var included: [App]? + + public init(data: BetaAppReviewDetail, links: DocumentLinks, included: [App]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppReviewDetailResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: BetaAppReviewDetailResponse, rhs: BetaAppReviewDetailResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetailUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetailUpdateRequest.swift new file mode 100644 index 000000000..73bd2aced --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetailUpdateRequest.swift @@ -0,0 +1,157 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaAppReviewDetailUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaAppReviewDetails = "betaAppReviewDetails" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var contactEmail: String? + + public var contactFirstName: String? + + public var contactLastName: String? + + public var contactPhone: String? + + public var demoAccountName: String? + + public var demoAccountPassword: String? + + public var demoAccountRequired: Bool? + + public var notes: String? + + public init(contactEmail: String? = nil, contactFirstName: String? = nil, contactLastName: String? = nil, contactPhone: String? = nil, demoAccountName: String? = nil, demoAccountPassword: String? = nil, demoAccountRequired: Bool? = nil, notes: String? = nil) { + self.contactEmail = contactEmail + self.contactFirstName = contactFirstName + self.contactLastName = contactLastName + self.contactPhone = contactPhone + self.demoAccountName = demoAccountName + self.demoAccountPassword = demoAccountPassword + self.demoAccountRequired = demoAccountRequired + self.notes = notes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + contactEmail = try container.decodeIfPresent("contactEmail") + contactFirstName = try container.decodeIfPresent("contactFirstName") + contactLastName = try container.decodeIfPresent("contactLastName") + contactPhone = try container.decodeIfPresent("contactPhone") + demoAccountName = try container.decodeIfPresent("demoAccountName") + demoAccountPassword = try container.decodeIfPresent("demoAccountPassword") + demoAccountRequired = try container.decodeIfPresent("demoAccountRequired") + notes = try container.decodeIfPresent("notes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(contactEmail, forKey: "contactEmail") + try container.encodeIfPresent(contactFirstName, forKey: "contactFirstName") + try container.encodeIfPresent(contactLastName, forKey: "contactLastName") + try container.encodeIfPresent(contactPhone, forKey: "contactPhone") + try container.encodeIfPresent(demoAccountName, forKey: "demoAccountName") + try container.encodeIfPresent(demoAccountPassword, forKey: "demoAccountPassword") + try container.encodeIfPresent(demoAccountRequired, forKey: "demoAccountRequired") + try container.encodeIfPresent(notes, forKey: "notes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.contactEmail == object.contactEmail else { return false } + guard self.contactFirstName == object.contactFirstName else { return false } + guard self.contactLastName == object.contactLastName else { return false } + guard self.contactPhone == object.contactPhone else { return false } + guard self.demoAccountName == object.demoAccountName else { return false } + guard self.demoAccountPassword == object.demoAccountPassword else { return false } + guard self.demoAccountRequired == object.demoAccountRequired else { return false } + guard self.notes == object.notes else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppReviewDetailUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaAppReviewDetailUpdateRequest, rhs: BetaAppReviewDetailUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetailsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetailsResponse.swift new file mode 100644 index 000000000..6ab3da99f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetailsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaAppReviewDetailsResponse: APIModel { + + public var data: [BetaAppReviewDetail] + + public var links: PagedDocumentLinks + + public var included: [App]? + + public var meta: PagingInformation? + + public init(data: [BetaAppReviewDetail], links: PagedDocumentLinks, included: [App]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppReviewDetailsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaAppReviewDetailsResponse, rhs: BetaAppReviewDetailsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmission.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmission.swift new file mode 100644 index 000000000..93557dda7 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmission.swift @@ -0,0 +1,242 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaAppReviewSubmission: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaAppReviewSubmissions = "betaAppReviewSubmissions" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var betaReviewState: BetaReviewState? + + public init(betaReviewState: BetaReviewState? = nil) { + self.betaReviewState = betaReviewState + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + betaReviewState = try container.decodeIfPresent("betaReviewState") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(betaReviewState, forKey: "betaReviewState") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.betaReviewState == object.betaReviewState else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var build: Build? + + public class Build: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Build else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: Build, rhs: Build) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(build: Build? = nil) { + self.build = build + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + build = try container.decodeIfPresent("build") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(build, forKey: "build") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.build == object.build else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppReviewSubmission else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: BetaAppReviewSubmission, rhs: BetaAppReviewSubmission) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmissionCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmissionCreateRequest.swift new file mode 100644 index 000000000..ea471bd20 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmissionCreateRequest.swift @@ -0,0 +1,181 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaAppReviewSubmissionCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaAppReviewSubmissions = "betaAppReviewSubmissions" + } + + public var relationships: Relationships + + public var type: `Type` + + public class Relationships: APIModel { + + public var build: Build + + public class Build: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Build else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: Build, rhs: Build) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(build: Build) { + self.build = build + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + build = try container.decode("build") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(build, forKey: "build") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.build == object.build else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, type: `Type`) { + self.relationships = relationships + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppReviewSubmissionCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaAppReviewSubmissionCreateRequest, rhs: BetaAppReviewSubmissionCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmissionResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmissionResponse.swift new file mode 100644 index 000000000..66d4a15c6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmissionResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaAppReviewSubmissionResponse: APIModel { + + public var data: BetaAppReviewSubmission + + public var links: DocumentLinks + + public var included: [Build]? + + public init(data: BetaAppReviewSubmission, links: DocumentLinks, included: [Build]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppReviewSubmissionResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: BetaAppReviewSubmissionResponse, rhs: BetaAppReviewSubmissionResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmissionsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmissionsResponse.swift new file mode 100644 index 000000000..d486a260e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmissionsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaAppReviewSubmissionsResponse: APIModel { + + public var data: [BetaAppReviewSubmission] + + public var links: PagedDocumentLinks + + public var included: [Build]? + + public var meta: PagingInformation? + + public init(data: [BetaAppReviewSubmission], links: PagedDocumentLinks, included: [Build]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppReviewSubmissionsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaAppReviewSubmissionsResponse, rhs: BetaAppReviewSubmissionsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalization.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalization.swift new file mode 100644 index 000000000..0c19fe680 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalization.swift @@ -0,0 +1,248 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaBuildLocalization: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaBuildLocalizations = "betaBuildLocalizations" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var locale: String? + + public var whatsNew: String? + + public init(locale: String? = nil, whatsNew: String? = nil) { + self.locale = locale + self.whatsNew = whatsNew + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + locale = try container.decodeIfPresent("locale") + whatsNew = try container.decodeIfPresent("whatsNew") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(locale, forKey: "locale") + try container.encodeIfPresent(whatsNew, forKey: "whatsNew") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.locale == object.locale else { return false } + guard self.whatsNew == object.whatsNew else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var build: Build? + + public class Build: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Build else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: Build, rhs: Build) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(build: Build? = nil) { + self.build = build + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + build = try container.decodeIfPresent("build") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(build, forKey: "build") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.build == object.build else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaBuildLocalization else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: BetaBuildLocalization, rhs: BetaBuildLocalization) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationCreateRequest.swift new file mode 100644 index 000000000..80be59bd6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationCreateRequest.swift @@ -0,0 +1,224 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaBuildLocalizationCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaBuildLocalizations = "betaBuildLocalizations" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var build: Build + + public class Build: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Build else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: Build, rhs: Build) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(build: Build) { + self.build = build + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + build = try container.decode("build") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(build, forKey: "build") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.build == object.build else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var locale: String + + public var whatsNew: String? + + public init(locale: String, whatsNew: String? = nil) { + self.locale = locale + self.whatsNew = whatsNew + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + locale = try container.decode("locale") + whatsNew = try container.decodeIfPresent("whatsNew") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(locale, forKey: "locale") + try container.encodeIfPresent(whatsNew, forKey: "whatsNew") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.locale == object.locale else { return false } + guard self.whatsNew == object.whatsNew else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaBuildLocalizationCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaBuildLocalizationCreateRequest, rhs: BetaBuildLocalizationCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationResponse.swift new file mode 100644 index 000000000..a8646050d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaBuildLocalizationResponse: APIModel { + + public var data: BetaBuildLocalization + + public var links: DocumentLinks + + public var included: [Build]? + + public init(data: BetaBuildLocalization, links: DocumentLinks, included: [Build]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaBuildLocalizationResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: BetaBuildLocalizationResponse, rhs: BetaBuildLocalizationResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationUpdateRequest.swift new file mode 100644 index 000000000..687e44bd1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationUpdateRequest.swift @@ -0,0 +1,115 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaBuildLocalizationUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaBuildLocalizations = "betaBuildLocalizations" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var whatsNew: String? + + public init(whatsNew: String? = nil) { + self.whatsNew = whatsNew + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + whatsNew = try container.decodeIfPresent("whatsNew") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(whatsNew, forKey: "whatsNew") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.whatsNew == object.whatsNew else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaBuildLocalizationUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaBuildLocalizationUpdateRequest, rhs: BetaBuildLocalizationUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationsResponse.swift new file mode 100644 index 000000000..47ecfc2e1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalizationsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaBuildLocalizationsResponse: APIModel { + + public var data: [BetaBuildLocalization] + + public var links: PagedDocumentLinks + + public var included: [Build]? + + public var meta: PagingInformation? + + public init(data: [BetaBuildLocalization], links: PagedDocumentLinks, included: [Build]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaBuildLocalizationsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaBuildLocalizationsResponse, rhs: BetaBuildLocalizationsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroup.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroup.swift new file mode 100644 index 000000000..343626b88 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroup.swift @@ -0,0 +1,544 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaGroup: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaGroups = "betaGroups" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var createdDate: DateTime? + + public var feedbackEnabled: Bool? + + public var isInternalGroup: Bool? + + public var name: String? + + public var publicLink: String? + + public var publicLinkEnabled: Bool? + + public var publicLinkId: String? + + public var publicLinkLimit: Int? + + public var publicLinkLimitEnabled: Bool? + + public init(createdDate: DateTime? = nil, feedbackEnabled: Bool? = nil, isInternalGroup: Bool? = nil, name: String? = nil, publicLink: String? = nil, publicLinkEnabled: Bool? = nil, publicLinkId: String? = nil, publicLinkLimit: Int? = nil, publicLinkLimitEnabled: Bool? = nil) { + self.createdDate = createdDate + self.feedbackEnabled = feedbackEnabled + self.isInternalGroup = isInternalGroup + self.name = name + self.publicLink = publicLink + self.publicLinkEnabled = publicLinkEnabled + self.publicLinkId = publicLinkId + self.publicLinkLimit = publicLinkLimit + self.publicLinkLimitEnabled = publicLinkLimitEnabled + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + createdDate = try container.decodeIfPresent("createdDate") + feedbackEnabled = try container.decodeIfPresent("feedbackEnabled") + isInternalGroup = try container.decodeIfPresent("isInternalGroup") + name = try container.decodeIfPresent("name") + publicLink = try container.decodeIfPresent("publicLink") + publicLinkEnabled = try container.decodeIfPresent("publicLinkEnabled") + publicLinkId = try container.decodeIfPresent("publicLinkId") + publicLinkLimit = try container.decodeIfPresent("publicLinkLimit") + publicLinkLimitEnabled = try container.decodeIfPresent("publicLinkLimitEnabled") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(createdDate, forKey: "createdDate") + try container.encodeIfPresent(feedbackEnabled, forKey: "feedbackEnabled") + try container.encodeIfPresent(isInternalGroup, forKey: "isInternalGroup") + try container.encodeIfPresent(name, forKey: "name") + try container.encodeIfPresent(publicLink, forKey: "publicLink") + try container.encodeIfPresent(publicLinkEnabled, forKey: "publicLinkEnabled") + try container.encodeIfPresent(publicLinkId, forKey: "publicLinkId") + try container.encodeIfPresent(publicLinkLimit, forKey: "publicLinkLimit") + try container.encodeIfPresent(publicLinkLimitEnabled, forKey: "publicLinkLimitEnabled") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.createdDate == object.createdDate else { return false } + guard self.feedbackEnabled == object.feedbackEnabled else { return false } + guard self.isInternalGroup == object.isInternalGroup else { return false } + guard self.name == object.name else { return false } + guard self.publicLink == object.publicLink else { return false } + guard self.publicLinkEnabled == object.publicLinkEnabled else { return false } + guard self.publicLinkId == object.publicLinkId else { return false } + guard self.publicLinkLimit == object.publicLinkLimit else { return false } + guard self.publicLinkLimitEnabled == object.publicLinkLimitEnabled else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var app: App? + + public var betaTesters: BetaTesters? + + public var builds: Builds? + + public class App: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class BetaTesters: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaTesters = "betaTesters" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTesters else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaTesters, rhs: BetaTesters) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Builds: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Builds else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: Builds, rhs: Builds) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App? = nil, betaTesters: BetaTesters? = nil, builds: Builds? = nil) { + self.app = app + self.betaTesters = betaTesters + self.builds = builds + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decodeIfPresent("app") + betaTesters = try container.decodeIfPresent("betaTesters") + builds = try container.decodeIfPresent("builds") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(app, forKey: "app") + try container.encodeIfPresent(betaTesters, forKey: "betaTesters") + try container.encodeIfPresent(builds, forKey: "builds") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + guard self.betaTesters == object.betaTesters else { return false } + guard self.builds == object.builds else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaGroup else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: BetaGroup, rhs: BetaGroup) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBetaTestersLinkagesRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBetaTestersLinkagesRequest.swift new file mode 100644 index 000000000..bdd011332 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBetaTestersLinkagesRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaGroupBetaTestersLinkagesRequest: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaTesters = "betaTesters" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaGroupBetaTestersLinkagesRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaGroupBetaTestersLinkagesRequest, rhs: BetaGroupBetaTestersLinkagesRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBetaTestersLinkagesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBetaTestersLinkagesResponse.swift new file mode 100644 index 000000000..0772bbed8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBetaTestersLinkagesResponse.swift @@ -0,0 +1,90 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaGroupBetaTestersLinkagesResponse: APIModel { + + public var data: [DataType] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaTesters = "betaTesters" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaGroupBetaTestersLinkagesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaGroupBetaTestersLinkagesResponse, rhs: BetaGroupBetaTestersLinkagesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBuildsLinkagesRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBuildsLinkagesRequest.swift new file mode 100644 index 000000000..4d843396d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBuildsLinkagesRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaGroupBuildsLinkagesRequest: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaGroupBuildsLinkagesRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaGroupBuildsLinkagesRequest, rhs: BetaGroupBuildsLinkagesRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBuildsLinkagesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBuildsLinkagesResponse.swift new file mode 100644 index 000000000..b0fb0fe0f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupBuildsLinkagesResponse.swift @@ -0,0 +1,90 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaGroupBuildsLinkagesResponse: APIModel { + + public var data: [DataType] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaGroupBuildsLinkagesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaGroupBuildsLinkagesResponse, rhs: BetaGroupBuildsLinkagesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupCreateRequest.swift new file mode 100644 index 000000000..516923bb9 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupCreateRequest.swift @@ -0,0 +1,398 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaGroupCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaGroups = "betaGroups" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var app: App + + public var betaTesters: BetaTesters? + + public var builds: Builds? + + public class App: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class BetaTesters: APIModel { + + public var data: [DataType]? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaTesters = "betaTesters" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTesters else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaTesters, rhs: BetaTesters) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Builds: APIModel { + + public var data: [DataType]? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Builds else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: Builds, rhs: Builds) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App, betaTesters: BetaTesters? = nil, builds: Builds? = nil) { + self.app = app + self.betaTesters = betaTesters + self.builds = builds + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decode("app") + betaTesters = try container.decodeIfPresent("betaTesters") + builds = try container.decodeIfPresent("builds") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(app, forKey: "app") + try container.encodeIfPresent(betaTesters, forKey: "betaTesters") + try container.encodeIfPresent(builds, forKey: "builds") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + guard self.betaTesters == object.betaTesters else { return false } + guard self.builds == object.builds else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var name: String + + public var feedbackEnabled: Bool? + + public var publicLinkEnabled: Bool? + + public var publicLinkLimit: Int? + + public var publicLinkLimitEnabled: Bool? + + public init(name: String, feedbackEnabled: Bool? = nil, publicLinkEnabled: Bool? = nil, publicLinkLimit: Int? = nil, publicLinkLimitEnabled: Bool? = nil) { + self.name = name + self.feedbackEnabled = feedbackEnabled + self.publicLinkEnabled = publicLinkEnabled + self.publicLinkLimit = publicLinkLimit + self.publicLinkLimitEnabled = publicLinkLimitEnabled + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + name = try container.decode("name") + feedbackEnabled = try container.decodeIfPresent("feedbackEnabled") + publicLinkEnabled = try container.decodeIfPresent("publicLinkEnabled") + publicLinkLimit = try container.decodeIfPresent("publicLinkLimit") + publicLinkLimitEnabled = try container.decodeIfPresent("publicLinkLimitEnabled") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(name, forKey: "name") + try container.encodeIfPresent(feedbackEnabled, forKey: "feedbackEnabled") + try container.encodeIfPresent(publicLinkEnabled, forKey: "publicLinkEnabled") + try container.encodeIfPresent(publicLinkLimit, forKey: "publicLinkLimit") + try container.encodeIfPresent(publicLinkLimitEnabled, forKey: "publicLinkLimitEnabled") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.name == object.name else { return false } + guard self.feedbackEnabled == object.feedbackEnabled else { return false } + guard self.publicLinkEnabled == object.publicLinkEnabled else { return false } + guard self.publicLinkLimit == object.publicLinkLimit else { return false } + guard self.publicLinkLimitEnabled == object.publicLinkLimitEnabled else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaGroupCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaGroupCreateRequest, rhs: BetaGroupCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupResponse.swift new file mode 100644 index 000000000..aac350e59 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaGroupResponse: APIModel { + + public var data: BetaGroup + + public var links: DocumentLinks + + public var included: [Included]? + + public init(data: BetaGroup, links: DocumentLinks, included: [Included]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaGroupResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: BetaGroupResponse, rhs: BetaGroupResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupUpdateRequest.swift new file mode 100644 index 000000000..27b058b13 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupUpdateRequest.swift @@ -0,0 +1,139 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaGroupUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaGroups = "betaGroups" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var feedbackEnabled: Bool? + + public var name: String? + + public var publicLinkEnabled: Bool? + + public var publicLinkLimit: Int? + + public var publicLinkLimitEnabled: Bool? + + public init(feedbackEnabled: Bool? = nil, name: String? = nil, publicLinkEnabled: Bool? = nil, publicLinkLimit: Int? = nil, publicLinkLimitEnabled: Bool? = nil) { + self.feedbackEnabled = feedbackEnabled + self.name = name + self.publicLinkEnabled = publicLinkEnabled + self.publicLinkLimit = publicLinkLimit + self.publicLinkLimitEnabled = publicLinkLimitEnabled + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + feedbackEnabled = try container.decodeIfPresent("feedbackEnabled") + name = try container.decodeIfPresent("name") + publicLinkEnabled = try container.decodeIfPresent("publicLinkEnabled") + publicLinkLimit = try container.decodeIfPresent("publicLinkLimit") + publicLinkLimitEnabled = try container.decodeIfPresent("publicLinkLimitEnabled") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(feedbackEnabled, forKey: "feedbackEnabled") + try container.encodeIfPresent(name, forKey: "name") + try container.encodeIfPresent(publicLinkEnabled, forKey: "publicLinkEnabled") + try container.encodeIfPresent(publicLinkLimit, forKey: "publicLinkLimit") + try container.encodeIfPresent(publicLinkLimitEnabled, forKey: "publicLinkLimitEnabled") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.feedbackEnabled == object.feedbackEnabled else { return false } + guard self.name == object.name else { return false } + guard self.publicLinkEnabled == object.publicLinkEnabled else { return false } + guard self.publicLinkLimit == object.publicLinkLimit else { return false } + guard self.publicLinkLimitEnabled == object.publicLinkLimitEnabled else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaGroupUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaGroupUpdateRequest, rhs: BetaGroupUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupsResponse.swift new file mode 100644 index 000000000..ada5b6285 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroupsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaGroupsResponse: APIModel { + + public var data: [BetaGroup] + + public var links: PagedDocumentLinks + + public var included: [Included]? + + public var meta: PagingInformation? + + public init(data: [BetaGroup], links: PagedDocumentLinks, included: [Included]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaGroupsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaGroupsResponse, rhs: BetaGroupsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaInviteType.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaInviteType.swift new file mode 100644 index 000000000..144702213 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaInviteType.swift @@ -0,0 +1,11 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum BetaInviteType: String, Codable, Equatable, CaseIterable { + case email = "EMAIL" + case publicLink = "PUBLIC_LINK" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreement.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreement.swift new file mode 100644 index 000000000..2c24cca54 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreement.swift @@ -0,0 +1,242 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaLicenseAgreement: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaLicenseAgreements = "betaLicenseAgreements" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var agreementText: String? + + public init(agreementText: String? = nil) { + self.agreementText = agreementText + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + agreementText = try container.decodeIfPresent("agreementText") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(agreementText, forKey: "agreementText") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.agreementText == object.agreementText else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var app: App? + + public class App: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App? = nil) { + self.app = app + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decodeIfPresent("app") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(app, forKey: "app") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaLicenseAgreement else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: BetaLicenseAgreement, rhs: BetaLicenseAgreement) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreementResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreementResponse.swift new file mode 100644 index 000000000..911e9fe28 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreementResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaLicenseAgreementResponse: APIModel { + + public var data: BetaLicenseAgreement + + public var links: DocumentLinks + + public var included: [App]? + + public init(data: BetaLicenseAgreement, links: DocumentLinks, included: [App]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaLicenseAgreementResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: BetaLicenseAgreementResponse, rhs: BetaLicenseAgreementResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreementUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreementUpdateRequest.swift new file mode 100644 index 000000000..2696795b4 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreementUpdateRequest.swift @@ -0,0 +1,115 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaLicenseAgreementUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaLicenseAgreements = "betaLicenseAgreements" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var agreementText: String? + + public init(agreementText: String? = nil) { + self.agreementText = agreementText + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + agreementText = try container.decodeIfPresent("agreementText") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(agreementText, forKey: "agreementText") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.agreementText == object.agreementText else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaLicenseAgreementUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaLicenseAgreementUpdateRequest, rhs: BetaLicenseAgreementUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreementsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreementsResponse.swift new file mode 100644 index 000000000..1b1d7b3c2 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreementsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaLicenseAgreementsResponse: APIModel { + + public var data: [BetaLicenseAgreement] + + public var links: PagedDocumentLinks + + public var included: [App]? + + public var meta: PagingInformation? + + public init(data: [BetaLicenseAgreement], links: PagedDocumentLinks, included: [App]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaLicenseAgreementsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaLicenseAgreementsResponse, rhs: BetaLicenseAgreementsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaReviewState.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaReviewState.swift new file mode 100644 index 000000000..037a4388e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaReviewState.swift @@ -0,0 +1,13 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum BetaReviewState: String, Codable, Equatable, CaseIterable { + case waitingForReview = "WAITING_FOR_REVIEW" + case inReview = "IN_REVIEW" + case rejected = "REJECTED" + case approved = "APPROVED" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTester.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTester.swift new file mode 100644 index 000000000..291e4deb7 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTester.swift @@ -0,0 +1,520 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaTester: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaTesters = "betaTesters" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var email: String? + + public var firstName: String? + + public var inviteType: BetaInviteType? + + public var lastName: String? + + public init(email: String? = nil, firstName: String? = nil, inviteType: BetaInviteType? = nil, lastName: String? = nil) { + self.email = email + self.firstName = firstName + self.inviteType = inviteType + self.lastName = lastName + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + email = try container.decodeIfPresent("email") + firstName = try container.decodeIfPresent("firstName") + inviteType = try container.decodeIfPresent("inviteType") + lastName = try container.decodeIfPresent("lastName") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(email, forKey: "email") + try container.encodeIfPresent(firstName, forKey: "firstName") + try container.encodeIfPresent(inviteType, forKey: "inviteType") + try container.encodeIfPresent(lastName, forKey: "lastName") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.email == object.email else { return false } + guard self.firstName == object.firstName else { return false } + guard self.inviteType == object.inviteType else { return false } + guard self.lastName == object.lastName else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var apps: Apps? + + public var betaGroups: BetaGroups? + + public var builds: Builds? + + public class Apps: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Apps else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: Apps, rhs: Apps) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class BetaGroups: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaGroups = "betaGroups" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaGroups else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaGroups, rhs: BetaGroups) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Builds: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Builds else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: Builds, rhs: Builds) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(apps: Apps? = nil, betaGroups: BetaGroups? = nil, builds: Builds? = nil) { + self.apps = apps + self.betaGroups = betaGroups + self.builds = builds + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + apps = try container.decodeIfPresent("apps") + betaGroups = try container.decodeIfPresent("betaGroups") + builds = try container.decodeIfPresent("builds") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(apps, forKey: "apps") + try container.encodeIfPresent(betaGroups, forKey: "betaGroups") + try container.encodeIfPresent(builds, forKey: "builds") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.apps == object.apps else { return false } + guard self.betaGroups == object.betaGroups else { return false } + guard self.builds == object.builds else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTester else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: BetaTester, rhs: BetaTester) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterAppsLinkagesRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterAppsLinkagesRequest.swift new file mode 100644 index 000000000..106c2110b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterAppsLinkagesRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaTesterAppsLinkagesRequest: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTesterAppsLinkagesRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaTesterAppsLinkagesRequest, rhs: BetaTesterAppsLinkagesRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterAppsLinkagesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterAppsLinkagesResponse.swift new file mode 100644 index 000000000..fdc882461 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterAppsLinkagesResponse.swift @@ -0,0 +1,90 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaTesterAppsLinkagesResponse: APIModel { + + public var data: [DataType] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTesterAppsLinkagesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaTesterAppsLinkagesResponse, rhs: BetaTesterAppsLinkagesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBetaGroupsLinkagesRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBetaGroupsLinkagesRequest.swift new file mode 100644 index 000000000..ccaf8002b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBetaGroupsLinkagesRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaTesterBetaGroupsLinkagesRequest: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaGroups = "betaGroups" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTesterBetaGroupsLinkagesRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaTesterBetaGroupsLinkagesRequest, rhs: BetaTesterBetaGroupsLinkagesRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBetaGroupsLinkagesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBetaGroupsLinkagesResponse.swift new file mode 100644 index 000000000..785423d01 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBetaGroupsLinkagesResponse.swift @@ -0,0 +1,90 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaTesterBetaGroupsLinkagesResponse: APIModel { + + public var data: [DataType] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaGroups = "betaGroups" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTesterBetaGroupsLinkagesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaTesterBetaGroupsLinkagesResponse, rhs: BetaTesterBetaGroupsLinkagesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBuildsLinkagesRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBuildsLinkagesRequest.swift new file mode 100644 index 000000000..35a560ac1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBuildsLinkagesRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaTesterBuildsLinkagesRequest: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTesterBuildsLinkagesRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaTesterBuildsLinkagesRequest, rhs: BetaTesterBuildsLinkagesRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBuildsLinkagesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBuildsLinkagesResponse.swift new file mode 100644 index 000000000..4d65423d6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterBuildsLinkagesResponse.swift @@ -0,0 +1,90 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaTesterBuildsLinkagesResponse: APIModel { + + public var data: [DataType] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTesterBuildsLinkagesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaTesterBuildsLinkagesResponse, rhs: BetaTesterBuildsLinkagesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterCreateRequest.swift new file mode 100644 index 000000000..e45b0cc4c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterCreateRequest.swift @@ -0,0 +1,308 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaTesterCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaTesters = "betaTesters" + } + + public var attributes: Attributes + + public var type: `Type` + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var email: String + + public var firstName: String? + + public var lastName: String? + + public init(email: String, firstName: String? = nil, lastName: String? = nil) { + self.email = email + self.firstName = firstName + self.lastName = lastName + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + email = try container.decode("email") + firstName = try container.decodeIfPresent("firstName") + lastName = try container.decodeIfPresent("lastName") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(email, forKey: "email") + try container.encodeIfPresent(firstName, forKey: "firstName") + try container.encodeIfPresent(lastName, forKey: "lastName") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.email == object.email else { return false } + guard self.firstName == object.firstName else { return false } + guard self.lastName == object.lastName else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var betaGroups: BetaGroups? + + public var builds: Builds? + + public class BetaGroups: APIModel { + + public var data: [DataType]? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaGroups = "betaGroups" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaGroups else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaGroups, rhs: BetaGroups) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Builds: APIModel { + + public var data: [DataType]? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Builds else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: Builds, rhs: Builds) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(betaGroups: BetaGroups? = nil, builds: Builds? = nil) { + self.betaGroups = betaGroups + self.builds = builds + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + betaGroups = try container.decodeIfPresent("betaGroups") + builds = try container.decodeIfPresent("builds") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(betaGroups, forKey: "betaGroups") + try container.encodeIfPresent(builds, forKey: "builds") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.betaGroups == object.betaGroups else { return false } + guard self.builds == object.builds else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(attributes: Attributes, type: `Type`, relationships: Relationships? = nil) { + self.attributes = attributes + self.type = type + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + attributes = try container.decode("attributes") + type = try container.decode("type") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTesterCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaTesterCreateRequest, rhs: BetaTesterCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterInvitation.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterInvitation.swift new file mode 100644 index 000000000..99c0bee51 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterInvitation.swift @@ -0,0 +1,53 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaTesterInvitation: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaTesterInvitations = "betaTesterInvitations" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public init(links: ResourceLinks, id: String, type: `Type`) { + self.links = links + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTesterInvitation else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: BetaTesterInvitation, rhs: BetaTesterInvitation) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterInvitationCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterInvitationCreateRequest.swift new file mode 100644 index 000000000..6b52f4583 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterInvitationCreateRequest.swift @@ -0,0 +1,259 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaTesterInvitationCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaTesterInvitations = "betaTesterInvitations" + } + + public var relationships: Relationships + + public var type: `Type` + + public class Relationships: APIModel { + + public var app: App + + public var betaTester: BetaTester + + public class App: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class BetaTester: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaTesters = "betaTesters" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTester else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaTester, rhs: BetaTester) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App, betaTester: BetaTester) { + self.app = app + self.betaTester = betaTester + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decode("app") + betaTester = try container.decode("betaTester") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(app, forKey: "app") + try container.encode(betaTester, forKey: "betaTester") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + guard self.betaTester == object.betaTester else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, type: `Type`) { + self.relationships = relationships + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTesterInvitationCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BetaTesterInvitationCreateRequest, rhs: BetaTesterInvitationCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterInvitationResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterInvitationResponse.swift new file mode 100644 index 000000000..d28adb63d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterInvitationResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaTesterInvitationResponse: APIModel { + + public var data: BetaTesterInvitation + + public var links: DocumentLinks + + public init(data: BetaTesterInvitation, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTesterInvitationResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: BetaTesterInvitationResponse, rhs: BetaTesterInvitationResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterResponse.swift new file mode 100644 index 000000000..01cb21da3 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTesterResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaTesterResponse: APIModel { + + public var data: BetaTester + + public var links: DocumentLinks + + public var included: [Included]? + + public init(data: BetaTester, links: DocumentLinks, included: [Included]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTesterResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: BetaTesterResponse, rhs: BetaTesterResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTestersResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTestersResponse.swift new file mode 100644 index 000000000..ce361045a --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTestersResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BetaTestersResponse: APIModel { + + public var data: [BetaTester] + + public var links: PagedDocumentLinks + + public var included: [Included]? + + public var meta: PagingInformation? + + public init(data: [BetaTester], links: PagedDocumentLinks, included: [Included]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaTestersResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaTestersResponse, rhs: BetaTestersResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BrazilAgeRating.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BrazilAgeRating.swift new file mode 100644 index 000000000..cb3909126 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BrazilAgeRating.swift @@ -0,0 +1,15 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum BrazilAgeRating: String, Codable, Equatable, CaseIterable { + case l = "L" + case ten = "TEN" + case twelve = "TWELVE" + case fourteen = "FOURTEEN" + case sixteen = "SIXTEEN" + case eighteen = "EIGHTEEN" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/Build.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Build.swift new file mode 100644 index 000000000..4ccb78e73 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Build.swift @@ -0,0 +1,1277 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class Build: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public enum ProcessingState: String, Codable, Equatable, CaseIterable { + case processing = "PROCESSING" + case failed = "FAILED" + case invalid = "INVALID" + case valid = "VALID" + } + + public var expirationDate: DateTime? + + public var expired: Bool? + + public var iconAssetToken: ImageAsset? + + public var minOsVersion: String? + + public var processingState: ProcessingState? + + public var uploadedDate: DateTime? + + public var usesNonExemptEncryption: Bool? + + public var version: String? + + public init(expirationDate: DateTime? = nil, expired: Bool? = nil, iconAssetToken: ImageAsset? = nil, minOsVersion: String? = nil, processingState: ProcessingState? = nil, uploadedDate: DateTime? = nil, usesNonExemptEncryption: Bool? = nil, version: String? = nil) { + self.expirationDate = expirationDate + self.expired = expired + self.iconAssetToken = iconAssetToken + self.minOsVersion = minOsVersion + self.processingState = processingState + self.uploadedDate = uploadedDate + self.usesNonExemptEncryption = usesNonExemptEncryption + self.version = version + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + expirationDate = try container.decodeIfPresent("expirationDate") + expired = try container.decodeIfPresent("expired") + iconAssetToken = try container.decodeIfPresent("iconAssetToken") + minOsVersion = try container.decodeIfPresent("minOsVersion") + processingState = try container.decodeIfPresent("processingState") + uploadedDate = try container.decodeIfPresent("uploadedDate") + usesNonExemptEncryption = try container.decodeIfPresent("usesNonExemptEncryption") + version = try container.decodeIfPresent("version") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(expirationDate, forKey: "expirationDate") + try container.encodeIfPresent(expired, forKey: "expired") + try container.encodeIfPresent(iconAssetToken, forKey: "iconAssetToken") + try container.encodeIfPresent(minOsVersion, forKey: "minOsVersion") + try container.encodeIfPresent(processingState, forKey: "processingState") + try container.encodeIfPresent(uploadedDate, forKey: "uploadedDate") + try container.encodeIfPresent(usesNonExemptEncryption, forKey: "usesNonExemptEncryption") + try container.encodeIfPresent(version, forKey: "version") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.expirationDate == object.expirationDate else { return false } + guard self.expired == object.expired else { return false } + guard self.iconAssetToken == object.iconAssetToken else { return false } + guard self.minOsVersion == object.minOsVersion else { return false } + guard self.processingState == object.processingState else { return false } + guard self.uploadedDate == object.uploadedDate else { return false } + guard self.usesNonExemptEncryption == object.usesNonExemptEncryption else { return false } + guard self.version == object.version else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var app: App? + + public var appEncryptionDeclaration: AppEncryptionDeclaration? + + public var appStoreVersion: AppStoreVersion? + + public var betaAppReviewSubmission: BetaAppReviewSubmission? + + public var betaBuildLocalizations: BetaBuildLocalizations? + + public var buildBetaDetail: BuildBetaDetail? + + public var icons: Icons? + + public var individualTesters: IndividualTesters? + + public var preReleaseVersion: PreReleaseVersion? + + public class App: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class AppEncryptionDeclaration: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appEncryptionDeclarations = "appEncryptionDeclarations" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppEncryptionDeclaration else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppEncryptionDeclaration, rhs: AppEncryptionDeclaration) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class AppStoreVersion: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersion else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreVersion, rhs: AppStoreVersion) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class BetaAppReviewSubmission: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaAppReviewSubmissions = "betaAppReviewSubmissions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaAppReviewSubmission else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: BetaAppReviewSubmission, rhs: BetaAppReviewSubmission) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class BetaBuildLocalizations: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaBuildLocalizations = "betaBuildLocalizations" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BetaBuildLocalizations else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BetaBuildLocalizations, rhs: BetaBuildLocalizations) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class BuildBetaDetail: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case buildBetaDetails = "buildBetaDetails" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildBetaDetail else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: BuildBetaDetail, rhs: BuildBetaDetail) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Icons: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case buildIcons = "buildIcons" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Icons else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: Icons, rhs: Icons) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class IndividualTesters: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaTesters = "betaTesters" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? IndividualTesters else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: IndividualTesters, rhs: IndividualTesters) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class PreReleaseVersion: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case preReleaseVersions = "preReleaseVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PreReleaseVersion else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: PreReleaseVersion, rhs: PreReleaseVersion) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App? = nil, appEncryptionDeclaration: AppEncryptionDeclaration? = nil, appStoreVersion: AppStoreVersion? = nil, betaAppReviewSubmission: BetaAppReviewSubmission? = nil, betaBuildLocalizations: BetaBuildLocalizations? = nil, buildBetaDetail: BuildBetaDetail? = nil, icons: Icons? = nil, individualTesters: IndividualTesters? = nil, preReleaseVersion: PreReleaseVersion? = nil) { + self.app = app + self.appEncryptionDeclaration = appEncryptionDeclaration + self.appStoreVersion = appStoreVersion + self.betaAppReviewSubmission = betaAppReviewSubmission + self.betaBuildLocalizations = betaBuildLocalizations + self.buildBetaDetail = buildBetaDetail + self.icons = icons + self.individualTesters = individualTesters + self.preReleaseVersion = preReleaseVersion + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decodeIfPresent("app") + appEncryptionDeclaration = try container.decodeIfPresent("appEncryptionDeclaration") + appStoreVersion = try container.decodeIfPresent("appStoreVersion") + betaAppReviewSubmission = try container.decodeIfPresent("betaAppReviewSubmission") + betaBuildLocalizations = try container.decodeIfPresent("betaBuildLocalizations") + buildBetaDetail = try container.decodeIfPresent("buildBetaDetail") + icons = try container.decodeIfPresent("icons") + individualTesters = try container.decodeIfPresent("individualTesters") + preReleaseVersion = try container.decodeIfPresent("preReleaseVersion") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(app, forKey: "app") + try container.encodeIfPresent(appEncryptionDeclaration, forKey: "appEncryptionDeclaration") + try container.encodeIfPresent(appStoreVersion, forKey: "appStoreVersion") + try container.encodeIfPresent(betaAppReviewSubmission, forKey: "betaAppReviewSubmission") + try container.encodeIfPresent(betaBuildLocalizations, forKey: "betaBuildLocalizations") + try container.encodeIfPresent(buildBetaDetail, forKey: "buildBetaDetail") + try container.encodeIfPresent(icons, forKey: "icons") + try container.encodeIfPresent(individualTesters, forKey: "individualTesters") + try container.encodeIfPresent(preReleaseVersion, forKey: "preReleaseVersion") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + guard self.appEncryptionDeclaration == object.appEncryptionDeclaration else { return false } + guard self.appStoreVersion == object.appStoreVersion else { return false } + guard self.betaAppReviewSubmission == object.betaAppReviewSubmission else { return false } + guard self.betaBuildLocalizations == object.betaBuildLocalizations else { return false } + guard self.buildBetaDetail == object.buildBetaDetail else { return false } + guard self.icons == object.icons else { return false } + guard self.individualTesters == object.individualTesters else { return false } + guard self.preReleaseVersion == object.preReleaseVersion else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Build else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: Build, rhs: Build) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildAppEncryptionDeclarationLinkageRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildAppEncryptionDeclarationLinkageRequest.swift new file mode 100644 index 000000000..0d0b73340 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildAppEncryptionDeclarationLinkageRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildAppEncryptionDeclarationLinkageRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appEncryptionDeclarations = "appEncryptionDeclarations" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildAppEncryptionDeclarationLinkageRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BuildAppEncryptionDeclarationLinkageRequest, rhs: BuildAppEncryptionDeclarationLinkageRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildAppEncryptionDeclarationLinkageResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildAppEncryptionDeclarationLinkageResponse.swift new file mode 100644 index 000000000..ac3ba642e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildAppEncryptionDeclarationLinkageResponse.swift @@ -0,0 +1,84 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildAppEncryptionDeclarationLinkageResponse: APIModel { + + public var data: DataType + + public var links: DocumentLinks + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appEncryptionDeclarations = "appEncryptionDeclarations" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildAppEncryptionDeclarationLinkageResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: BuildAppEncryptionDeclarationLinkageResponse, rhs: BuildAppEncryptionDeclarationLinkageResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetail.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetail.swift new file mode 100644 index 000000000..4f48e8ce1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetail.swift @@ -0,0 +1,254 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildBetaDetail: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case buildBetaDetails = "buildBetaDetails" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var autoNotifyEnabled: Bool? + + public var externalBuildState: ExternalBetaState? + + public var internalBuildState: InternalBetaState? + + public init(autoNotifyEnabled: Bool? = nil, externalBuildState: ExternalBetaState? = nil, internalBuildState: InternalBetaState? = nil) { + self.autoNotifyEnabled = autoNotifyEnabled + self.externalBuildState = externalBuildState + self.internalBuildState = internalBuildState + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + autoNotifyEnabled = try container.decodeIfPresent("autoNotifyEnabled") + externalBuildState = try container.decodeIfPresent("externalBuildState") + internalBuildState = try container.decodeIfPresent("internalBuildState") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(autoNotifyEnabled, forKey: "autoNotifyEnabled") + try container.encodeIfPresent(externalBuildState, forKey: "externalBuildState") + try container.encodeIfPresent(internalBuildState, forKey: "internalBuildState") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.autoNotifyEnabled == object.autoNotifyEnabled else { return false } + guard self.externalBuildState == object.externalBuildState else { return false } + guard self.internalBuildState == object.internalBuildState else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var build: Build? + + public class Build: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Build else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: Build, rhs: Build) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(build: Build? = nil) { + self.build = build + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + build = try container.decodeIfPresent("build") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(build, forKey: "build") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.build == object.build else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildBetaDetail else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: BuildBetaDetail, rhs: BuildBetaDetail) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetailResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetailResponse.swift new file mode 100644 index 000000000..3d2b0318b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetailResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildBetaDetailResponse: APIModel { + + public var data: BuildBetaDetail + + public var links: DocumentLinks + + public var included: [Build]? + + public init(data: BuildBetaDetail, links: DocumentLinks, included: [Build]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildBetaDetailResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: BuildBetaDetailResponse, rhs: BuildBetaDetailResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetailUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetailUpdateRequest.swift new file mode 100644 index 000000000..b44accfdb --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetailUpdateRequest.swift @@ -0,0 +1,115 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildBetaDetailUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case buildBetaDetails = "buildBetaDetails" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var autoNotifyEnabled: Bool? + + public init(autoNotifyEnabled: Bool? = nil) { + self.autoNotifyEnabled = autoNotifyEnabled + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + autoNotifyEnabled = try container.decodeIfPresent("autoNotifyEnabled") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(autoNotifyEnabled, forKey: "autoNotifyEnabled") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.autoNotifyEnabled == object.autoNotifyEnabled else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildBetaDetailUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BuildBetaDetailUpdateRequest, rhs: BuildBetaDetailUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetailsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetailsResponse.swift new file mode 100644 index 000000000..67cf757e0 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetailsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildBetaDetailsResponse: APIModel { + + public var data: [BuildBetaDetail] + + public var links: PagedDocumentLinks + + public var included: [Build]? + + public var meta: PagingInformation? + + public init(data: [BuildBetaDetail], links: PagedDocumentLinks, included: [Build]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildBetaDetailsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BuildBetaDetailsResponse, rhs: BuildBetaDetailsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaGroupsLinkagesRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaGroupsLinkagesRequest.swift new file mode 100644 index 000000000..5e100ce2d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaGroupsLinkagesRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildBetaGroupsLinkagesRequest: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaGroups = "betaGroups" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildBetaGroupsLinkagesRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BuildBetaGroupsLinkagesRequest, rhs: BuildBetaGroupsLinkagesRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaNotification.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaNotification.swift new file mode 100644 index 000000000..c49b836e9 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaNotification.swift @@ -0,0 +1,53 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildBetaNotification: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case buildBetaNotifications = "buildBetaNotifications" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public init(links: ResourceLinks, id: String, type: `Type`) { + self.links = links + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildBetaNotification else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: BuildBetaNotification, rhs: BuildBetaNotification) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaNotificationCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaNotificationCreateRequest.swift new file mode 100644 index 000000000..710340562 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaNotificationCreateRequest.swift @@ -0,0 +1,181 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildBetaNotificationCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case buildBetaNotifications = "buildBetaNotifications" + } + + public var relationships: Relationships + + public var type: `Type` + + public class Relationships: APIModel { + + public var build: Build + + public class Build: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Build else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: Build, rhs: Build) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(build: Build) { + self.build = build + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + build = try container.decode("build") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(build, forKey: "build") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.build == object.build else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, type: `Type`) { + self.relationships = relationships + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildBetaNotificationCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BuildBetaNotificationCreateRequest, rhs: BuildBetaNotificationCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaNotificationResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaNotificationResponse.swift new file mode 100644 index 000000000..aab4e3748 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaNotificationResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildBetaNotificationResponse: APIModel { + + public var data: BuildBetaNotification + + public var links: DocumentLinks + + public init(data: BuildBetaNotification, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildBetaNotificationResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: BuildBetaNotificationResponse, rhs: BuildBetaNotificationResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIcon.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIcon.swift new file mode 100644 index 000000000..3f4933236 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIcon.swift @@ -0,0 +1,96 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildIcon: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case buildIcons = "buildIcons" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var iconAsset: ImageAsset? + + public var iconType: IconAssetType? + + public init(iconAsset: ImageAsset? = nil, iconType: IconAssetType? = nil) { + self.iconAsset = iconAsset + self.iconType = iconType + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + iconAsset = try container.decodeIfPresent("iconAsset") + iconType = try container.decodeIfPresent("iconType") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(iconAsset, forKey: "iconAsset") + try container.encodeIfPresent(iconType, forKey: "iconType") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.iconAsset == object.iconAsset else { return false } + guard self.iconType == object.iconType else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildIcon else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: BuildIcon, rhs: BuildIcon) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIconsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIconsResponse.swift new file mode 100644 index 000000000..01c90c650 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIconsResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildIconsResponse: APIModel { + + public var data: [BuildIcon] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init(data: [BuildIcon], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildIconsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BuildIconsResponse, rhs: BuildIconsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIndividualTestersLinkagesRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIndividualTestersLinkagesRequest.swift new file mode 100644 index 000000000..52d1786c5 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIndividualTestersLinkagesRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildIndividualTestersLinkagesRequest: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaTesters = "betaTesters" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildIndividualTestersLinkagesRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BuildIndividualTestersLinkagesRequest, rhs: BuildIndividualTestersLinkagesRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIndividualTestersLinkagesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIndividualTestersLinkagesResponse.swift new file mode 100644 index 000000000..58c1c6f4b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildIndividualTestersLinkagesResponse.swift @@ -0,0 +1,90 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildIndividualTestersLinkagesResponse: APIModel { + + public var data: [DataType] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case betaTesters = "betaTesters" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildIndividualTestersLinkagesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BuildIndividualTestersLinkagesResponse, rhs: BuildIndividualTestersLinkagesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildResponse.swift new file mode 100644 index 000000000..b71fa9875 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildResponse: APIModel { + + public var data: Build + + public var links: DocumentLinks + + public var included: [Included]? + + public init(data: Build, links: DocumentLinks, included: [Included]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: BuildResponse, rhs: BuildResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildUpdateRequest.swift new file mode 100644 index 000000000..c98ec9515 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildUpdateRequest.swift @@ -0,0 +1,230 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var expired: Bool? + + public var usesNonExemptEncryption: Bool? + + public init(expired: Bool? = nil, usesNonExemptEncryption: Bool? = nil) { + self.expired = expired + self.usesNonExemptEncryption = usesNonExemptEncryption + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + expired = try container.decodeIfPresent("expired") + usesNonExemptEncryption = try container.decodeIfPresent("usesNonExemptEncryption") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(expired, forKey: "expired") + try container.encodeIfPresent(usesNonExemptEncryption, forKey: "usesNonExemptEncryption") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.expired == object.expired else { return false } + guard self.usesNonExemptEncryption == object.usesNonExemptEncryption else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var appEncryptionDeclaration: AppEncryptionDeclaration? + + public class AppEncryptionDeclaration: APIModel { + + public var data: DataType? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appEncryptionDeclarations = "appEncryptionDeclarations" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppEncryptionDeclaration else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppEncryptionDeclaration, rhs: AppEncryptionDeclaration) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appEncryptionDeclaration: AppEncryptionDeclaration? = nil) { + self.appEncryptionDeclaration = appEncryptionDeclaration + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appEncryptionDeclaration = try container.decodeIfPresent("appEncryptionDeclaration") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appEncryptionDeclaration, forKey: "appEncryptionDeclaration") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appEncryptionDeclaration == object.appEncryptionDeclaration else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BuildUpdateRequest, rhs: BuildUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildsResponse.swift new file mode 100644 index 000000000..1f49d2e3b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BuildsResponse: APIModel { + + public var data: [Build] + + public var links: PagedDocumentLinks + + public var included: [Included]? + + public var meta: PagingInformation? + + public init(data: [Build], links: PagedDocumentLinks, included: [Included]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BuildsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BuildsResponse, rhs: BuildsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleId.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleId.swift new file mode 100644 index 000000000..c55205e08 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleId.swift @@ -0,0 +1,514 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BundleId: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case bundleIds = "bundleIds" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var identifier: String? + + public var name: String? + + public var platform: BundleIdPlatform? + + public var seedId: String? + + public init(identifier: String? = nil, name: String? = nil, platform: BundleIdPlatform? = nil, seedId: String? = nil) { + self.identifier = identifier + self.name = name + self.platform = platform + self.seedId = seedId + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + identifier = try container.decodeIfPresent("identifier") + name = try container.decodeIfPresent("name") + platform = try container.decodeIfPresent("platform") + seedId = try container.decodeIfPresent("seedId") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(identifier, forKey: "identifier") + try container.encodeIfPresent(name, forKey: "name") + try container.encodeIfPresent(platform, forKey: "platform") + try container.encodeIfPresent(seedId, forKey: "seedId") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.identifier == object.identifier else { return false } + guard self.name == object.name else { return false } + guard self.platform == object.platform else { return false } + guard self.seedId == object.seedId else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var app: App? + + public var bundleIdCapabilities: BundleIdCapabilities? + + public var profiles: Profiles? + + public class App: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class BundleIdCapabilities: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case bundleIdCapabilities = "bundleIdCapabilities" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BundleIdCapabilities else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BundleIdCapabilities, rhs: BundleIdCapabilities) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Profiles: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case profiles = "profiles" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Profiles else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: Profiles, rhs: Profiles) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App? = nil, bundleIdCapabilities: BundleIdCapabilities? = nil, profiles: Profiles? = nil) { + self.app = app + self.bundleIdCapabilities = bundleIdCapabilities + self.profiles = profiles + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decodeIfPresent("app") + bundleIdCapabilities = try container.decodeIfPresent("bundleIdCapabilities") + profiles = try container.decodeIfPresent("profiles") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(app, forKey: "app") + try container.encodeIfPresent(bundleIdCapabilities, forKey: "bundleIdCapabilities") + try container.encodeIfPresent(profiles, forKey: "profiles") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + guard self.bundleIdCapabilities == object.bundleIdCapabilities else { return false } + guard self.profiles == object.profiles else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BundleId else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: BundleId, rhs: BundleId) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilitiesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilitiesResponse.swift new file mode 100644 index 000000000..a5da6ffb3 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilitiesResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BundleIdCapabilitiesResponse: APIModel { + + public var data: [BundleIdCapability] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init(data: [BundleIdCapability], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BundleIdCapabilitiesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BundleIdCapabilitiesResponse, rhs: BundleIdCapabilitiesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapability.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapability.swift new file mode 100644 index 000000000..8702e1aee --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapability.swift @@ -0,0 +1,96 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BundleIdCapability: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case bundleIdCapabilities = "bundleIdCapabilities" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var capabilityType: CapabilityType? + + public var settings: [CapabilitySetting]? + + public init(capabilityType: CapabilityType? = nil, settings: [CapabilitySetting]? = nil) { + self.capabilityType = capabilityType + self.settings = settings + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + capabilityType = try container.decodeIfPresent("capabilityType") + settings = try container.decodeArrayIfPresent("settings") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(capabilityType, forKey: "capabilityType") + try container.encodeIfPresent(settings, forKey: "settings") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.capabilityType == object.capabilityType else { return false } + guard self.settings == object.settings else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BundleIdCapability else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: BundleIdCapability, rhs: BundleIdCapability) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilityCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilityCreateRequest.swift new file mode 100644 index 000000000..f4e42f5f5 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilityCreateRequest.swift @@ -0,0 +1,224 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BundleIdCapabilityCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case bundleIdCapabilities = "bundleIdCapabilities" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var bundleId: BundleId + + public class BundleId: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case bundleIds = "bundleIds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BundleId else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BundleId, rhs: BundleId) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(bundleId: BundleId) { + self.bundleId = bundleId + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + bundleId = try container.decode("bundleId") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(bundleId, forKey: "bundleId") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.bundleId == object.bundleId else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var capabilityType: CapabilityType + + public var settings: [CapabilitySetting]? + + public init(capabilityType: CapabilityType, settings: [CapabilitySetting]? = nil) { + self.capabilityType = capabilityType + self.settings = settings + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + capabilityType = try container.decode("capabilityType") + settings = try container.decodeArrayIfPresent("settings") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(capabilityType, forKey: "capabilityType") + try container.encodeIfPresent(settings, forKey: "settings") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.capabilityType == object.capabilityType else { return false } + guard self.settings == object.settings else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BundleIdCapabilityCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BundleIdCapabilityCreateRequest, rhs: BundleIdCapabilityCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilityResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilityResponse.swift new file mode 100644 index 000000000..8c431b32a --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilityResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BundleIdCapabilityResponse: APIModel { + + public var data: BundleIdCapability + + public var links: DocumentLinks + + public init(data: BundleIdCapability, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BundleIdCapabilityResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: BundleIdCapabilityResponse, rhs: BundleIdCapabilityResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilityUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilityUpdateRequest.swift new file mode 100644 index 000000000..d958ed833 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCapabilityUpdateRequest.swift @@ -0,0 +1,121 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BundleIdCapabilityUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case bundleIdCapabilities = "bundleIdCapabilities" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var capabilityType: CapabilityType? + + public var settings: [CapabilitySetting]? + + public init(capabilityType: CapabilityType? = nil, settings: [CapabilitySetting]? = nil) { + self.capabilityType = capabilityType + self.settings = settings + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + capabilityType = try container.decodeIfPresent("capabilityType") + settings = try container.decodeArrayIfPresent("settings") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(capabilityType, forKey: "capabilityType") + try container.encodeIfPresent(settings, forKey: "settings") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.capabilityType == object.capabilityType else { return false } + guard self.settings == object.settings else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BundleIdCapabilityUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BundleIdCapabilityUpdateRequest, rhs: BundleIdCapabilityUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCreateRequest.swift new file mode 100644 index 000000000..746b54ad0 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdCreateRequest.swift @@ -0,0 +1,127 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BundleIdCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case bundleIds = "bundleIds" + } + + public var attributes: Attributes + + public var type: `Type` + + public class Attributes: APIModel { + + public var identifier: String + + public var name: String + + public var platform: BundleIdPlatform + + public var seedId: String? + + public init(identifier: String, name: String, platform: BundleIdPlatform, seedId: String? = nil) { + self.identifier = identifier + self.name = name + self.platform = platform + self.seedId = seedId + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + identifier = try container.decode("identifier") + name = try container.decode("name") + platform = try container.decode("platform") + seedId = try container.decodeIfPresent("seedId") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(identifier, forKey: "identifier") + try container.encode(name, forKey: "name") + try container.encode(platform, forKey: "platform") + try container.encodeIfPresent(seedId, forKey: "seedId") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.identifier == object.identifier else { return false } + guard self.name == object.name else { return false } + guard self.platform == object.platform else { return false } + guard self.seedId == object.seedId else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(attributes: Attributes, type: `Type`) { + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BundleIdCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BundleIdCreateRequest, rhs: BundleIdCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdPlatform.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdPlatform.swift new file mode 100644 index 000000000..dc988c2cd --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdPlatform.swift @@ -0,0 +1,11 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum BundleIdPlatform: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + case macOs = "MAC_OS" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdResponse.swift new file mode 100644 index 000000000..31ee0b2b8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BundleIdResponse: APIModel { + + public var data: BundleId + + public var links: DocumentLinks + + public var included: [Included]? + + public init(data: BundleId, links: DocumentLinks, included: [Included]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BundleIdResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: BundleIdResponse, rhs: BundleIdResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdUpdateRequest.swift new file mode 100644 index 000000000..c9f1e1a80 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdUpdateRequest.swift @@ -0,0 +1,115 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BundleIdUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case bundleIds = "bundleIds" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var name: String? + + public init(name: String? = nil) { + self.name = name + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + name = try container.decodeIfPresent("name") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(name, forKey: "name") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.name == object.name else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BundleIdUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BundleIdUpdateRequest, rhs: BundleIdUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdsResponse.swift new file mode 100644 index 000000000..da8f1a652 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleIdsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class BundleIdsResponse: APIModel { + + public var data: [BundleId] + + public var links: PagedDocumentLinks + + public var included: [Included]? + + public var meta: PagingInformation? + + public init(data: [BundleId], links: PagedDocumentLinks, included: [Included]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BundleIdsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: BundleIdsResponse, rhs: BundleIdsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/CapabilityOption.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/CapabilityOption.swift new file mode 100644 index 000000000..758acbd4c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/CapabilityOption.swift @@ -0,0 +1,76 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class CapabilityOption: APIModel { + + public enum Key: String, Codable, Equatable, CaseIterable { + case xcode5 = "XCODE_5" + case xcode6 = "XCODE_6" + case completeProtection = "COMPLETE_PROTECTION" + case protectedUnlessOpen = "PROTECTED_UNLESS_OPEN" + case protectedUntilFirstUserAuth = "PROTECTED_UNTIL_FIRST_USER_AUTH" + case primaryAppConsent = "PRIMARY_APP_CONSENT" + } + + public var description: String? + + public var enabled: Bool? + + public var enabledByDefault: Bool? + + public var key: Key? + + public var name: String? + + public var supportsWildcard: Bool? + + public init(description: String? = nil, enabled: Bool? = nil, enabledByDefault: Bool? = nil, key: Key? = nil, name: String? = nil, supportsWildcard: Bool? = nil) { + self.description = description + self.enabled = enabled + self.enabledByDefault = enabledByDefault + self.key = key + self.name = name + self.supportsWildcard = supportsWildcard + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + description = try container.decodeIfPresent("description") + enabled = try container.decodeIfPresent("enabled") + enabledByDefault = try container.decodeIfPresent("enabledByDefault") + key = try container.decodeIfPresent("key") + name = try container.decodeIfPresent("name") + supportsWildcard = try container.decodeIfPresent("supportsWildcard") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(description, forKey: "description") + try container.encodeIfPresent(enabled, forKey: "enabled") + try container.encodeIfPresent(enabledByDefault, forKey: "enabledByDefault") + try container.encodeIfPresent(key, forKey: "key") + try container.encodeIfPresent(name, forKey: "name") + try container.encodeIfPresent(supportsWildcard, forKey: "supportsWildcard") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? CapabilityOption else { return false } + guard self.description == object.description else { return false } + guard self.enabled == object.enabled else { return false } + guard self.enabledByDefault == object.enabledByDefault else { return false } + guard self.key == object.key else { return false } + guard self.name == object.name else { return false } + guard self.supportsWildcard == object.supportsWildcard else { return false } + return true + } + + public static func == (lhs: CapabilityOption, rhs: CapabilityOption) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/CapabilitySetting.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/CapabilitySetting.swift new file mode 100644 index 000000000..8ecead7d4 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/CapabilitySetting.swift @@ -0,0 +1,91 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class CapabilitySetting: APIModel { + + public enum AllowedInstances: String, Codable, Equatable, CaseIterable { + case entry = "ENTRY" + case single = "SINGLE" + case multiple = "MULTIPLE" + } + + public enum Key: String, Codable, Equatable, CaseIterable { + case icloudVersion = "ICLOUD_VERSION" + case dataProtectionPermissionLevel = "DATA_PROTECTION_PERMISSION_LEVEL" + case appleIdAuthAppConsent = "APPLE_ID_AUTH_APP_CONSENT" + } + + public var allowedInstances: AllowedInstances? + + public var description: String? + + public var enabledByDefault: Bool? + + public var key: Key? + + public var minInstances: Int? + + public var name: String? + + public var options: [CapabilityOption]? + + public var visible: Bool? + + public init(allowedInstances: AllowedInstances? = nil, description: String? = nil, enabledByDefault: Bool? = nil, key: Key? = nil, minInstances: Int? = nil, name: String? = nil, options: [CapabilityOption]? = nil, visible: Bool? = nil) { + self.allowedInstances = allowedInstances + self.description = description + self.enabledByDefault = enabledByDefault + self.key = key + self.minInstances = minInstances + self.name = name + self.options = options + self.visible = visible + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + allowedInstances = try container.decodeIfPresent("allowedInstances") + description = try container.decodeIfPresent("description") + enabledByDefault = try container.decodeIfPresent("enabledByDefault") + key = try container.decodeIfPresent("key") + minInstances = try container.decodeIfPresent("minInstances") + name = try container.decodeIfPresent("name") + options = try container.decodeArrayIfPresent("options") + visible = try container.decodeIfPresent("visible") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(allowedInstances, forKey: "allowedInstances") + try container.encodeIfPresent(description, forKey: "description") + try container.encodeIfPresent(enabledByDefault, forKey: "enabledByDefault") + try container.encodeIfPresent(key, forKey: "key") + try container.encodeIfPresent(minInstances, forKey: "minInstances") + try container.encodeIfPresent(name, forKey: "name") + try container.encodeIfPresent(options, forKey: "options") + try container.encodeIfPresent(visible, forKey: "visible") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? CapabilitySetting else { return false } + guard self.allowedInstances == object.allowedInstances else { return false } + guard self.description == object.description else { return false } + guard self.enabledByDefault == object.enabledByDefault else { return false } + guard self.key == object.key else { return false } + guard self.minInstances == object.minInstances else { return false } + guard self.name == object.name else { return false } + guard self.options == object.options else { return false } + guard self.visible == object.visible else { return false } + return true + } + + public static func == (lhs: CapabilitySetting, rhs: CapabilitySetting) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/CapabilityType.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/CapabilityType.swift new file mode 100644 index 000000000..fe4e0d105 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/CapabilityType.swift @@ -0,0 +1,37 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum CapabilityType: String, Codable, Equatable, CaseIterable { + case icloud = "ICLOUD" + case inAppPurchase = "IN_APP_PURCHASE" + case gameCenter = "GAME_CENTER" + case pushNotifications = "PUSH_NOTIFICATIONS" + case wallet = "WALLET" + case interAppAudio = "INTER_APP_AUDIO" + case maps = "MAPS" + case associatedDomains = "ASSOCIATED_DOMAINS" + case personalVpn = "PERSONAL_VPN" + case appGroups = "APP_GROUPS" + case healthkit = "HEALTHKIT" + case homekit = "HOMEKIT" + case wirelessAccessoryConfiguration = "WIRELESS_ACCESSORY_CONFIGURATION" + case applePay = "APPLE_PAY" + case dataProtection = "DATA_PROTECTION" + case sirikit = "SIRIKIT" + case networkExtensions = "NETWORK_EXTENSIONS" + case multipath = "MULTIPATH" + case hotSpot = "HOT_SPOT" + case nfcTagReading = "NFC_TAG_READING" + case classkit = "CLASSKIT" + case autofillCredentialProvider = "AUTOFILL_CREDENTIAL_PROVIDER" + case accessWifiInformation = "ACCESS_WIFI_INFORMATION" + case networkCustomProtocol = "NETWORK_CUSTOM_PROTOCOL" + case coremediaHlsLowLatency = "COREMEDIA_HLS_LOW_LATENCY" + case systemExtensionInstall = "SYSTEM_EXTENSION_INSTALL" + case userManagement = "USER_MANAGEMENT" + case appleIdAuth = "APPLE_ID_AUTH" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/Certificate.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Certificate.swift new file mode 100644 index 000000000..286438888 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Certificate.swift @@ -0,0 +1,126 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class Certificate: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case certificates = "certificates" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var certificateContent: String? + + public var certificateType: CertificateType? + + public var displayName: String? + + public var expirationDate: DateTime? + + public var name: String? + + public var platform: BundleIdPlatform? + + public var serialNumber: String? + + public init(certificateContent: String? = nil, certificateType: CertificateType? = nil, displayName: String? = nil, expirationDate: DateTime? = nil, name: String? = nil, platform: BundleIdPlatform? = nil, serialNumber: String? = nil) { + self.certificateContent = certificateContent + self.certificateType = certificateType + self.displayName = displayName + self.expirationDate = expirationDate + self.name = name + self.platform = platform + self.serialNumber = serialNumber + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + certificateContent = try container.decodeIfPresent("certificateContent") + certificateType = try container.decodeIfPresent("certificateType") + displayName = try container.decodeIfPresent("displayName") + expirationDate = try container.decodeIfPresent("expirationDate") + name = try container.decodeIfPresent("name") + platform = try container.decodeIfPresent("platform") + serialNumber = try container.decodeIfPresent("serialNumber") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(certificateContent, forKey: "certificateContent") + try container.encodeIfPresent(certificateType, forKey: "certificateType") + try container.encodeIfPresent(displayName, forKey: "displayName") + try container.encodeIfPresent(expirationDate, forKey: "expirationDate") + try container.encodeIfPresent(name, forKey: "name") + try container.encodeIfPresent(platform, forKey: "platform") + try container.encodeIfPresent(serialNumber, forKey: "serialNumber") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.certificateContent == object.certificateContent else { return false } + guard self.certificateType == object.certificateType else { return false } + guard self.displayName == object.displayName else { return false } + guard self.expirationDate == object.expirationDate else { return false } + guard self.name == object.name else { return false } + guard self.platform == object.platform else { return false } + guard self.serialNumber == object.serialNumber else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Certificate else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: Certificate, rhs: Certificate) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificateCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificateCreateRequest.swift new file mode 100644 index 000000000..1aabcc02d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificateCreateRequest.swift @@ -0,0 +1,115 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class CertificateCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case certificates = "certificates" + } + + public var attributes: Attributes + + public var type: `Type` + + public class Attributes: APIModel { + + public var csrContent: String + + public var certificateType: CertificateType + + public init(csrContent: String, certificateType: CertificateType) { + self.csrContent = csrContent + self.certificateType = certificateType + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + csrContent = try container.decode("csrContent") + certificateType = try container.decode("certificateType") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(csrContent, forKey: "csrContent") + try container.encode(certificateType, forKey: "certificateType") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.csrContent == object.csrContent else { return false } + guard self.certificateType == object.certificateType else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(attributes: Attributes, type: `Type`) { + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? CertificateCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: CertificateCreateRequest, rhs: CertificateCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificateResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificateResponse.swift new file mode 100644 index 000000000..0470159b6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificateResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class CertificateResponse: APIModel { + + public var data: Certificate + + public var links: DocumentLinks + + public init(data: Certificate, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? CertificateResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: CertificateResponse, rhs: CertificateResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificateType.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificateType.swift new file mode 100644 index 000000000..9446cdfb2 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificateType.swift @@ -0,0 +1,18 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum CertificateType: String, Codable, Equatable, CaseIterable { + case iosDevelopment = "IOS_DEVELOPMENT" + case iosDistribution = "IOS_DISTRIBUTION" + case macAppDistribution = "MAC_APP_DISTRIBUTION" + case macInstallerDistribution = "MAC_INSTALLER_DISTRIBUTION" + case macAppDevelopment = "MAC_APP_DEVELOPMENT" + case developerIdKext = "DEVELOPER_ID_KEXT" + case developerIdApplication = "DEVELOPER_ID_APPLICATION" + case development = "DEVELOPMENT" + case distribution = "DISTRIBUTION" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificatesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificatesResponse.swift new file mode 100644 index 000000000..e8f607ae3 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/CertificatesResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class CertificatesResponse: APIModel { + + public var data: [Certificate] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init(data: [Certificate], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? CertificatesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: CertificatesResponse, rhs: CertificatesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/Device.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Device.swift new file mode 100644 index 000000000..0d3589c90 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Device.swift @@ -0,0 +1,140 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class Device: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case devices = "devices" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public enum DeviceClass: String, Codable, Equatable, CaseIterable { + case appleWatch = "APPLE_WATCH" + case ipad = "IPAD" + case iphone = "IPHONE" + case ipod = "IPOD" + case appleTv = "APPLE_TV" + case mac = "MAC" + } + + public enum Status: String, Codable, Equatable, CaseIterable { + case enabled = "ENABLED" + case disabled = "DISABLED" + } + + public var addedDate: DateTime? + + public var deviceClass: DeviceClass? + + public var model: String? + + public var name: String? + + public var platform: BundleIdPlatform? + + public var status: Status? + + public var udid: String? + + public init(addedDate: DateTime? = nil, deviceClass: DeviceClass? = nil, model: String? = nil, name: String? = nil, platform: BundleIdPlatform? = nil, status: Status? = nil, udid: String? = nil) { + self.addedDate = addedDate + self.deviceClass = deviceClass + self.model = model + self.name = name + self.platform = platform + self.status = status + self.udid = udid + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + addedDate = try container.decodeIfPresent("addedDate") + deviceClass = try container.decodeIfPresent("deviceClass") + model = try container.decodeIfPresent("model") + name = try container.decodeIfPresent("name") + platform = try container.decodeIfPresent("platform") + status = try container.decodeIfPresent("status") + udid = try container.decodeIfPresent("udid") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(addedDate, forKey: "addedDate") + try container.encodeIfPresent(deviceClass, forKey: "deviceClass") + try container.encodeIfPresent(model, forKey: "model") + try container.encodeIfPresent(name, forKey: "name") + try container.encodeIfPresent(platform, forKey: "platform") + try container.encodeIfPresent(status, forKey: "status") + try container.encodeIfPresent(udid, forKey: "udid") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.addedDate == object.addedDate else { return false } + guard self.deviceClass == object.deviceClass else { return false } + guard self.model == object.model else { return false } + guard self.name == object.name else { return false } + guard self.platform == object.platform else { return false } + guard self.status == object.status else { return false } + guard self.udid == object.udid else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Device else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: Device, rhs: Device) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/DeviceCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DeviceCreateRequest.swift new file mode 100644 index 000000000..b6dbebd56 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DeviceCreateRequest.swift @@ -0,0 +1,121 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class DeviceCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case devices = "devices" + } + + public var attributes: Attributes + + public var type: `Type` + + public class Attributes: APIModel { + + public var name: String + + public var udid: String + + public var platform: BundleIdPlatform + + public init(name: String, udid: String, platform: BundleIdPlatform) { + self.name = name + self.udid = udid + self.platform = platform + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + name = try container.decode("name") + udid = try container.decode("udid") + platform = try container.decode("platform") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(name, forKey: "name") + try container.encode(udid, forKey: "udid") + try container.encode(platform, forKey: "platform") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.name == object.name else { return false } + guard self.udid == object.udid else { return false } + guard self.platform == object.platform else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(attributes: Attributes, type: `Type`) { + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DeviceCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: DeviceCreateRequest, rhs: DeviceCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/DeviceResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DeviceResponse.swift new file mode 100644 index 000000000..77f6572ad --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DeviceResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class DeviceResponse: APIModel { + + public var data: Device + + public var links: DocumentLinks + + public init(data: Device, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DeviceResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: DeviceResponse, rhs: DeviceResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/DeviceUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DeviceUpdateRequest.swift new file mode 100644 index 000000000..e59a4b5bc --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DeviceUpdateRequest.swift @@ -0,0 +1,126 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class DeviceUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case devices = "devices" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public enum Status: String, Codable, Equatable, CaseIterable { + case enabled = "ENABLED" + case disabled = "DISABLED" + } + + public var name: String? + + public var status: Status? + + public init(name: String? = nil, status: Status? = nil) { + self.name = name + self.status = status + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + name = try container.decodeIfPresent("name") + status = try container.decodeIfPresent("status") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(name, forKey: "name") + try container.encodeIfPresent(status, forKey: "status") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.name == object.name else { return false } + guard self.status == object.status else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DeviceUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: DeviceUpdateRequest, rhs: DeviceUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/DevicesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DevicesResponse.swift new file mode 100644 index 000000000..70605844e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DevicesResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class DevicesResponse: APIModel { + + public var data: [Device] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init(data: [Device], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DevicesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: DevicesResponse, rhs: DevicesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticLog.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticLog.swift new file mode 100644 index 000000000..37f30fa99 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticLog.swift @@ -0,0 +1,53 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class DiagnosticLog: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case diagnosticLogs = "diagnosticLogs" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public init(links: ResourceLinks, id: String, type: `Type`) { + self.links = links + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DiagnosticLog else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DiagnosticLog, rhs: DiagnosticLog) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticLogsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticLogsResponse.swift new file mode 100644 index 000000000..c177e252c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticLogsResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class DiagnosticLogsResponse: APIModel { + + public var data: [DiagnosticLog] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init(data: [DiagnosticLog], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DiagnosticLogsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: DiagnosticLogsResponse, rhs: DiagnosticLogsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticSignature.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticSignature.swift new file mode 100644 index 000000000..af62117d7 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticSignature.swift @@ -0,0 +1,106 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class DiagnosticSignature: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case diagnosticSignatures = "diagnosticSignatures" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public enum DiagnosticType: String, Codable, Equatable, CaseIterable { + case diskWrites = "DISK_WRITES" + } + + public var diagnosticType: DiagnosticType? + + public var signature: String? + + public var weight: Double? + + public init(diagnosticType: DiagnosticType? = nil, signature: String? = nil, weight: Double? = nil) { + self.diagnosticType = diagnosticType + self.signature = signature + self.weight = weight + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + diagnosticType = try container.decodeIfPresent("diagnosticType") + signature = try container.decodeIfPresent("signature") + weight = try container.decodeIfPresent("weight") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(diagnosticType, forKey: "diagnosticType") + try container.encodeIfPresent(signature, forKey: "signature") + try container.encodeIfPresent(weight, forKey: "weight") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.diagnosticType == object.diagnosticType else { return false } + guard self.signature == object.signature else { return false } + guard self.weight == object.weight else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DiagnosticSignature else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DiagnosticSignature, rhs: DiagnosticSignature) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticSignaturesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticSignaturesResponse.swift new file mode 100644 index 000000000..88652a518 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DiagnosticSignaturesResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class DiagnosticSignaturesResponse: APIModel { + + public var data: [DiagnosticSignature] + + public var links: PagedDocumentLinks + + public var included: [DiagnosticLog]? + + public var meta: PagingInformation? + + public init(data: [DiagnosticSignature], links: PagedDocumentLinks, included: [DiagnosticLog]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DiagnosticSignaturesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: DiagnosticSignaturesResponse, rhs: DiagnosticSignaturesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/DocumentLinks.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DocumentLinks.swift new file mode 100644 index 000000000..1e6036020 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DocumentLinks.swift @@ -0,0 +1,37 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class DocumentLinks: APIModel { + + public var `self`: String + + public init(`self`: String) { + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + `self` = try container.decode("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DocumentLinks else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: DocumentLinks, rhs: DocumentLinks) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreement.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreement.swift new file mode 100644 index 000000000..323ca1756 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreement.swift @@ -0,0 +1,369 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class EndUserLicenseAgreement: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case endUserLicenseAgreements = "endUserLicenseAgreements" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var agreementText: String? + + public init(agreementText: String? = nil) { + self.agreementText = agreementText + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + agreementText = try container.decodeIfPresent("agreementText") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(agreementText, forKey: "agreementText") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.agreementText == object.agreementText else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var app: App? + + public var territories: Territories? + + public class App: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Territories: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case territories = "territories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Territories else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: Territories, rhs: Territories) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App? = nil, territories: Territories? = nil) { + self.app = app + self.territories = territories + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decodeIfPresent("app") + territories = try container.decodeIfPresent("territories") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(app, forKey: "app") + try container.encodeIfPresent(territories, forKey: "territories") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + guard self.territories == object.territories else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? EndUserLicenseAgreement else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: EndUserLicenseAgreement, rhs: EndUserLicenseAgreement) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreementCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreementCreateRequest.swift new file mode 100644 index 000000000..b9b92f0bd --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreementCreateRequest.swift @@ -0,0 +1,296 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class EndUserLicenseAgreementCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case endUserLicenseAgreements = "endUserLicenseAgreements" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var app: App + + public var territories: Territories + + public class App: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Territories: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case territories = "territories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Territories else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: Territories, rhs: Territories) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App, territories: Territories) { + self.app = app + self.territories = territories + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decode("app") + territories = try container.decode("territories") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(app, forKey: "app") + try container.encode(territories, forKey: "territories") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + guard self.territories == object.territories else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var agreementText: String + + public init(agreementText: String) { + self.agreementText = agreementText + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + agreementText = try container.decode("agreementText") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(agreementText, forKey: "agreementText") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.agreementText == object.agreementText else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? EndUserLicenseAgreementCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: EndUserLicenseAgreementCreateRequest, rhs: EndUserLicenseAgreementCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreementResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreementResponse.swift new file mode 100644 index 000000000..3cac75cdc --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreementResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class EndUserLicenseAgreementResponse: APIModel { + + public var data: EndUserLicenseAgreement + + public var links: DocumentLinks + + public var included: [Territory]? + + public init(data: EndUserLicenseAgreement, links: DocumentLinks, included: [Territory]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? EndUserLicenseAgreementResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: EndUserLicenseAgreementResponse, rhs: EndUserLicenseAgreementResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreementUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreementUpdateRequest.swift new file mode 100644 index 000000000..e68aedc9f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreementUpdateRequest.swift @@ -0,0 +1,224 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class EndUserLicenseAgreementUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case endUserLicenseAgreements = "endUserLicenseAgreements" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var agreementText: String? + + public init(agreementText: String? = nil) { + self.agreementText = agreementText + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + agreementText = try container.decodeIfPresent("agreementText") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(agreementText, forKey: "agreementText") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.agreementText == object.agreementText else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var territories: Territories? + + public class Territories: APIModel { + + public var data: [DataType]? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case territories = "territories" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Territories else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: Territories, rhs: Territories) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(territories: Territories? = nil) { + self.territories = territories + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + territories = try container.decodeIfPresent("territories") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(territories, forKey: "territories") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.territories == object.territories else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? EndUserLicenseAgreementUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: EndUserLicenseAgreementUpdateRequest, rhs: EndUserLicenseAgreementUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/ErrorResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ErrorResponse.swift new file mode 100644 index 000000000..c41375b79 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ErrorResponse.swift @@ -0,0 +1,98 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class ErrorResponse: APIModel { + + public var errors: [Errors]? + + public class Errors: APIModel { + + public var code: String + + public var detail: String + + public var title: String + + public var status: String + + public var id: String? + + public var source: Source? + + public init(code: String, detail: String, title: String, status: String, id: String? = nil, source: Source? = nil) { + self.code = code + self.detail = detail + self.title = title + self.status = status + self.id = id + self.source = source + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + code = try container.decode("code") + detail = try container.decode("detail") + title = try container.decode("title") + status = try container.decode("status") + id = try container.decodeIfPresent("id") + source = try container.decodeIfPresent("source") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(code, forKey: "code") + try container.encode(detail, forKey: "detail") + try container.encode(title, forKey: "title") + try container.encode(status, forKey: "status") + try container.encodeIfPresent(id, forKey: "id") + try container.encodeIfPresent(source, forKey: "source") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Errors else { return false } + guard self.code == object.code else { return false } + guard self.detail == object.detail else { return false } + guard self.title == object.title else { return false } + guard self.status == object.status else { return false } + guard self.id == object.id else { return false } + guard self.source == object.source else { return false } + return true + } + + public static func == (lhs: Errors, rhs: Errors) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(errors: [Errors]? = nil) { + self.errors = errors + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + errors = try container.decodeArrayIfPresent("errors") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(errors, forKey: "errors") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? ErrorResponse else { return false } + guard self.errors == object.errors else { return false } + return true + } + + public static func == (lhs: ErrorResponse, rhs: ErrorResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/ExternalBetaState.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ExternalBetaState.swift new file mode 100644 index 000000000..59160e6d2 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ExternalBetaState.swift @@ -0,0 +1,21 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum ExternalBetaState: String, Codable, Equatable, CaseIterable { + case processing = "PROCESSING" + case processingException = "PROCESSING_EXCEPTION" + case missingExportCompliance = "MISSING_EXPORT_COMPLIANCE" + case readyForBetaTesting = "READY_FOR_BETA_TESTING" + case inBetaTesting = "IN_BETA_TESTING" + case expired = "EXPIRED" + case readyForBetaSubmission = "READY_FOR_BETA_SUBMISSION" + case inExportComplianceReview = "IN_EXPORT_COMPLIANCE_REVIEW" + case waitingForBetaReview = "WAITING_FOR_BETA_REVIEW" + case inBetaReview = "IN_BETA_REVIEW" + case betaRejected = "BETA_REJECTED" + case betaApproved = "BETA_APPROVED" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersion.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersion.swift new file mode 100644 index 000000000..a76f6b78f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersion.swift @@ -0,0 +1,381 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class GameCenterEnabledVersion: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var iconAsset: ImageAsset? + + public var platform: Platform? + + public var versionString: String? + + public init(iconAsset: ImageAsset? = nil, platform: Platform? = nil, versionString: String? = nil) { + self.iconAsset = iconAsset + self.platform = platform + self.versionString = versionString + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + iconAsset = try container.decodeIfPresent("iconAsset") + platform = try container.decodeIfPresent("platform") + versionString = try container.decodeIfPresent("versionString") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(iconAsset, forKey: "iconAsset") + try container.encodeIfPresent(platform, forKey: "platform") + try container.encodeIfPresent(versionString, forKey: "versionString") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.iconAsset == object.iconAsset else { return false } + guard self.platform == object.platform else { return false } + guard self.versionString == object.versionString else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var app: App? + + public var compatibleVersions: CompatibleVersions? + + public class App: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class CompatibleVersions: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? CompatibleVersions else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: CompatibleVersions, rhs: CompatibleVersions) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App? = nil, compatibleVersions: CompatibleVersions? = nil) { + self.app = app + self.compatibleVersions = compatibleVersions + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decodeIfPresent("app") + compatibleVersions = try container.decodeIfPresent("compatibleVersions") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(app, forKey: "app") + try container.encodeIfPresent(compatibleVersions, forKey: "compatibleVersions") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + guard self.compatibleVersions == object.compatibleVersions else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? GameCenterEnabledVersion else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: GameCenterEnabledVersion, rhs: GameCenterEnabledVersion) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersionCompatibleVersionsLinkagesRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersionCompatibleVersionsLinkagesRequest.swift new file mode 100644 index 000000000..476beb2d3 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersionCompatibleVersionsLinkagesRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class GameCenterEnabledVersionCompatibleVersionsLinkagesRequest: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? GameCenterEnabledVersionCompatibleVersionsLinkagesRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: GameCenterEnabledVersionCompatibleVersionsLinkagesRequest, rhs: GameCenterEnabledVersionCompatibleVersionsLinkagesRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersionCompatibleVersionsLinkagesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersionCompatibleVersionsLinkagesResponse.swift new file mode 100644 index 000000000..e6ea7a13f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersionCompatibleVersionsLinkagesResponse.swift @@ -0,0 +1,90 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class GameCenterEnabledVersionCompatibleVersionsLinkagesResponse: APIModel { + + public var data: [DataType] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? GameCenterEnabledVersionCompatibleVersionsLinkagesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: GameCenterEnabledVersionCompatibleVersionsLinkagesResponse, rhs: GameCenterEnabledVersionCompatibleVersionsLinkagesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersionsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersionsResponse.swift new file mode 100644 index 000000000..79b7fe5c6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersionsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class GameCenterEnabledVersionsResponse: APIModel { + + public var data: [GameCenterEnabledVersion] + + public var links: PagedDocumentLinks + + public var included: [GameCenterEnabledVersion]? + + public var meta: PagingInformation? + + public init(data: [GameCenterEnabledVersion], links: PagedDocumentLinks, included: [GameCenterEnabledVersion]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? GameCenterEnabledVersionsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: GameCenterEnabledVersionsResponse, rhs: GameCenterEnabledVersionsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/IconAssetType.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/IconAssetType.swift new file mode 100644 index 000000000..0dc8d84e8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/IconAssetType.swift @@ -0,0 +1,14 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum IconAssetType: String, Codable, Equatable, CaseIterable { + case appStore = "APP_STORE" + case messagesAppStore = "MESSAGES_APP_STORE" + case watchAppStore = "WATCH_APP_STORE" + case tvOsHomeScreen = "TV_OS_HOME_SCREEN" + case tvOsTopShelf = "TV_OS_TOP_SHELF" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclaration.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclaration.swift new file mode 100644 index 000000000..5cc7451b6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclaration.swift @@ -0,0 +1,260 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class IdfaDeclaration: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case idfaDeclarations = "idfaDeclarations" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var attributesActionWithPreviousAd: Bool? + + public var attributesAppInstallationToPreviousAd: Bool? + + public var honorsLimitedAdTracking: Bool? + + public var servesAds: Bool? + + public init(attributesActionWithPreviousAd: Bool? = nil, attributesAppInstallationToPreviousAd: Bool? = nil, honorsLimitedAdTracking: Bool? = nil, servesAds: Bool? = nil) { + self.attributesActionWithPreviousAd = attributesActionWithPreviousAd + self.attributesAppInstallationToPreviousAd = attributesAppInstallationToPreviousAd + self.honorsLimitedAdTracking = honorsLimitedAdTracking + self.servesAds = servesAds + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + attributesActionWithPreviousAd = try container.decodeIfPresent("attributesActionWithPreviousAd") + attributesAppInstallationToPreviousAd = try container.decodeIfPresent("attributesAppInstallationToPreviousAd") + honorsLimitedAdTracking = try container.decodeIfPresent("honorsLimitedAdTracking") + servesAds = try container.decodeIfPresent("servesAds") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(attributesActionWithPreviousAd, forKey: "attributesActionWithPreviousAd") + try container.encodeIfPresent(attributesAppInstallationToPreviousAd, forKey: "attributesAppInstallationToPreviousAd") + try container.encodeIfPresent(honorsLimitedAdTracking, forKey: "honorsLimitedAdTracking") + try container.encodeIfPresent(servesAds, forKey: "servesAds") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.attributesActionWithPreviousAd == object.attributesActionWithPreviousAd else { return false } + guard self.attributesAppInstallationToPreviousAd == object.attributesAppInstallationToPreviousAd else { return false } + guard self.honorsLimitedAdTracking == object.honorsLimitedAdTracking else { return false } + guard self.servesAds == object.servesAds else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var appStoreVersion: AppStoreVersion? + + public class AppStoreVersion: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersion else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreVersion, rhs: AppStoreVersion) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appStoreVersion: AppStoreVersion? = nil) { + self.appStoreVersion = appStoreVersion + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreVersion = try container.decodeIfPresent("appStoreVersion") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appStoreVersion, forKey: "appStoreVersion") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appStoreVersion == object.appStoreVersion else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? IdfaDeclaration else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: IdfaDeclaration, rhs: IdfaDeclaration) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclarationCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclarationCreateRequest.swift new file mode 100644 index 000000000..f683ead93 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclarationCreateRequest.swift @@ -0,0 +1,236 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class IdfaDeclarationCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case idfaDeclarations = "idfaDeclarations" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var appStoreVersion: AppStoreVersion + + public class AppStoreVersion: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersion else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersion, rhs: AppStoreVersion) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appStoreVersion: AppStoreVersion) { + self.appStoreVersion = appStoreVersion + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreVersion = try container.decode("appStoreVersion") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(appStoreVersion, forKey: "appStoreVersion") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appStoreVersion == object.appStoreVersion else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var attributesAppInstallationToPreviousAd: Bool + + public var servesAds: Bool + + public var attributesActionWithPreviousAd: Bool + + public var honorsLimitedAdTracking: Bool + + public init(attributesAppInstallationToPreviousAd: Bool, servesAds: Bool, attributesActionWithPreviousAd: Bool, honorsLimitedAdTracking: Bool) { + self.attributesAppInstallationToPreviousAd = attributesAppInstallationToPreviousAd + self.servesAds = servesAds + self.attributesActionWithPreviousAd = attributesActionWithPreviousAd + self.honorsLimitedAdTracking = honorsLimitedAdTracking + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + attributesAppInstallationToPreviousAd = try container.decode("attributesAppInstallationToPreviousAd") + servesAds = try container.decode("servesAds") + attributesActionWithPreviousAd = try container.decode("attributesActionWithPreviousAd") + honorsLimitedAdTracking = try container.decode("honorsLimitedAdTracking") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(attributesAppInstallationToPreviousAd, forKey: "attributesAppInstallationToPreviousAd") + try container.encode(servesAds, forKey: "servesAds") + try container.encode(attributesActionWithPreviousAd, forKey: "attributesActionWithPreviousAd") + try container.encode(honorsLimitedAdTracking, forKey: "honorsLimitedAdTracking") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.attributesAppInstallationToPreviousAd == object.attributesAppInstallationToPreviousAd else { return false } + guard self.servesAds == object.servesAds else { return false } + guard self.attributesActionWithPreviousAd == object.attributesActionWithPreviousAd else { return false } + guard self.honorsLimitedAdTracking == object.honorsLimitedAdTracking else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? IdfaDeclarationCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: IdfaDeclarationCreateRequest, rhs: IdfaDeclarationCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclarationResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclarationResponse.swift new file mode 100644 index 000000000..6380d4f34 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclarationResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class IdfaDeclarationResponse: APIModel { + + public var data: IdfaDeclaration + + public var links: DocumentLinks + + public init(data: IdfaDeclaration, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? IdfaDeclarationResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: IdfaDeclarationResponse, rhs: IdfaDeclarationResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclarationUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclarationUpdateRequest.swift new file mode 100644 index 000000000..54e3bb2a8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclarationUpdateRequest.swift @@ -0,0 +1,133 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class IdfaDeclarationUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case idfaDeclarations = "idfaDeclarations" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var attributesActionWithPreviousAd: Bool? + + public var attributesAppInstallationToPreviousAd: Bool? + + public var honorsLimitedAdTracking: Bool? + + public var servesAds: Bool? + + public init(attributesActionWithPreviousAd: Bool? = nil, attributesAppInstallationToPreviousAd: Bool? = nil, honorsLimitedAdTracking: Bool? = nil, servesAds: Bool? = nil) { + self.attributesActionWithPreviousAd = attributesActionWithPreviousAd + self.attributesAppInstallationToPreviousAd = attributesAppInstallationToPreviousAd + self.honorsLimitedAdTracking = honorsLimitedAdTracking + self.servesAds = servesAds + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + attributesActionWithPreviousAd = try container.decodeIfPresent("attributesActionWithPreviousAd") + attributesAppInstallationToPreviousAd = try container.decodeIfPresent("attributesAppInstallationToPreviousAd") + honorsLimitedAdTracking = try container.decodeIfPresent("honorsLimitedAdTracking") + servesAds = try container.decodeIfPresent("servesAds") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(attributesActionWithPreviousAd, forKey: "attributesActionWithPreviousAd") + try container.encodeIfPresent(attributesAppInstallationToPreviousAd, forKey: "attributesAppInstallationToPreviousAd") + try container.encodeIfPresent(honorsLimitedAdTracking, forKey: "honorsLimitedAdTracking") + try container.encodeIfPresent(servesAds, forKey: "servesAds") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.attributesActionWithPreviousAd == object.attributesActionWithPreviousAd else { return false } + guard self.attributesAppInstallationToPreviousAd == object.attributesAppInstallationToPreviousAd else { return false } + guard self.honorsLimitedAdTracking == object.honorsLimitedAdTracking else { return false } + guard self.servesAds == object.servesAds else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? IdfaDeclarationUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: IdfaDeclarationUpdateRequest, rhs: IdfaDeclarationUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/ImageAsset.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ImageAsset.swift new file mode 100644 index 000000000..d08e97e5d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ImageAsset.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class ImageAsset: APIModel { + + public var height: Int? + + public var templateUrl: String? + + public var width: Int? + + public init(height: Int? = nil, templateUrl: String? = nil, width: Int? = nil) { + self.height = height + self.templateUrl = templateUrl + self.width = width + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + height = try container.decodeIfPresent("height") + templateUrl = try container.decodeIfPresent("templateUrl") + width = try container.decodeIfPresent("width") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(height, forKey: "height") + try container.encodeIfPresent(templateUrl, forKey: "templateUrl") + try container.encodeIfPresent(width, forKey: "width") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? ImageAsset else { return false } + guard self.height == object.height else { return false } + guard self.templateUrl == object.templateUrl else { return false } + guard self.width == object.width else { return false } + return true + } + + public static func == (lhs: ImageAsset, rhs: ImageAsset) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchase.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchase.swift new file mode 100644 index 000000000..fd52524b6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchase.swift @@ -0,0 +1,296 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class InAppPurchase: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case inAppPurchases = "inAppPurchases" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public enum InAppPurchaseType: String, Codable, Equatable, CaseIterable { + case automaticallyRenewableSubscription = "AUTOMATICALLY_RENEWABLE_SUBSCRIPTION" + case nonConsumable = "NON_CONSUMABLE" + case consumable = "CONSUMABLE" + case nonRenewingSubscription = "NON_RENEWING_SUBSCRIPTION" + case freeSubscription = "FREE_SUBSCRIPTION" + } + + public enum State: String, Codable, Equatable, CaseIterable { + case created = "CREATED" + case developerSignedOff = "DEVELOPER_SIGNED_OFF" + case developerActionNeeded = "DEVELOPER_ACTION_NEEDED" + case deletionInProgress = "DELETION_IN_PROGRESS" + case approved = "APPROVED" + case deleted = "DELETED" + case removedFromSale = "REMOVED_FROM_SALE" + case developerRemovedFromSale = "DEVELOPER_REMOVED_FROM_SALE" + case waitingForUpload = "WAITING_FOR_UPLOAD" + case processingContent = "PROCESSING_CONTENT" + case replaced = "REPLACED" + case rejected = "REJECTED" + case waitingForScreenshot = "WAITING_FOR_SCREENSHOT" + case prepareForSubmission = "PREPARE_FOR_SUBMISSION" + case missingMetadata = "MISSING_METADATA" + case readyToSubmit = "READY_TO_SUBMIT" + case waitingForReview = "WAITING_FOR_REVIEW" + case inReview = "IN_REVIEW" + case pendingDeveloperRelease = "PENDING_DEVELOPER_RELEASE" + } + + public var inAppPurchaseType: InAppPurchaseType? + + public var productId: String? + + public var referenceName: String? + + public var state: State? + + public init(inAppPurchaseType: InAppPurchaseType? = nil, productId: String? = nil, referenceName: String? = nil, state: State? = nil) { + self.inAppPurchaseType = inAppPurchaseType + self.productId = productId + self.referenceName = referenceName + self.state = state + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + inAppPurchaseType = try container.decodeIfPresent("inAppPurchaseType") + productId = try container.decodeIfPresent("productId") + referenceName = try container.decodeIfPresent("referenceName") + state = try container.decodeIfPresent("state") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(inAppPurchaseType, forKey: "inAppPurchaseType") + try container.encodeIfPresent(productId, forKey: "productId") + try container.encodeIfPresent(referenceName, forKey: "referenceName") + try container.encodeIfPresent(state, forKey: "state") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.inAppPurchaseType == object.inAppPurchaseType else { return false } + guard self.productId == object.productId else { return false } + guard self.referenceName == object.referenceName else { return false } + guard self.state == object.state else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var apps: Apps? + + public class Apps: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Apps else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: Apps, rhs: Apps) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(apps: Apps? = nil) { + self.apps = apps + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + apps = try container.decodeIfPresent("apps") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(apps, forKey: "apps") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.apps == object.apps else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? InAppPurchase else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: InAppPurchase, rhs: InAppPurchase) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchaseResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchaseResponse.swift new file mode 100644 index 000000000..65c3ba339 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchaseResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class InAppPurchaseResponse: APIModel { + + public var data: InAppPurchase + + public var links: DocumentLinks + + public init(data: InAppPurchase, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? InAppPurchaseResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: InAppPurchaseResponse, rhs: InAppPurchaseResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchasesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchasesResponse.swift new file mode 100644 index 000000000..78dcc01c5 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchasesResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class InAppPurchasesResponse: APIModel { + + public var data: [InAppPurchase] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init(data: [InAppPurchase], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? InAppPurchasesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: InAppPurchasesResponse, rhs: InAppPurchasesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/InternalBetaState.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/InternalBetaState.swift new file mode 100644 index 000000000..da62065bc --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/InternalBetaState.swift @@ -0,0 +1,16 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum InternalBetaState: String, Codable, Equatable, CaseIterable { + case processing = "PROCESSING" + case processingException = "PROCESSING_EXCEPTION" + case missingExportCompliance = "MISSING_EXPORT_COMPLIANCE" + case readyForBetaTesting = "READY_FOR_BETA_TESTING" + case inBetaTesting = "IN_BETA_TESTING" + case expired = "EXPIRED" + case inExportComplianceReview = "IN_EXPORT_COMPLIANCE_REVIEW" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/KidsAgeBand.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/KidsAgeBand.swift new file mode 100644 index 000000000..a8565a9d1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/KidsAgeBand.swift @@ -0,0 +1,12 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum KidsAgeBand: String, Codable, Equatable, CaseIterable { + case fiveAndUnder = "FIVE_AND_UNDER" + case sixToEight = "SIX_TO_EIGHT" + case nineToEleven = "NINE_TO_ELEVEN" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/PagedDocumentLinks.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PagedDocumentLinks.swift new file mode 100644 index 000000000..aefdfcdda --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PagedDocumentLinks.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class PagedDocumentLinks: APIModel { + + public var `self`: String + + public var first: String? + + public var next: String? + + public init(`self`: String, first: String? = nil, next: String? = nil) { + self.`self` = `self` + self.first = first + self.next = next + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + `self` = try container.decode("self") + first = try container.decodeIfPresent("first") + next = try container.decodeIfPresent("next") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(`self`, forKey: "self") + try container.encodeIfPresent(first, forKey: "first") + try container.encodeIfPresent(next, forKey: "next") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PagedDocumentLinks else { return false } + guard self.`self` == object.`self` else { return false } + guard self.first == object.first else { return false } + guard self.next == object.next else { return false } + return true + } + + public static func == (lhs: PagedDocumentLinks, rhs: PagedDocumentLinks) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/PagingInformation.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PagingInformation.swift new file mode 100644 index 000000000..1550b5719 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PagingInformation.swift @@ -0,0 +1,74 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class PagingInformation: APIModel { + + public var paging: Paging + + public class Paging: APIModel { + + public var total: Int + + public var limit: Int + + public init(total: Int, limit: Int) { + self.total = total + self.limit = limit + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + total = try container.decode("total") + limit = try container.decode("limit") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(total, forKey: "total") + try container.encode(limit, forKey: "limit") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Paging else { return false } + guard self.total == object.total else { return false } + guard self.limit == object.limit else { return false } + return true + } + + public static func == (lhs: Paging, rhs: Paging) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(paging: Paging) { + self.paging = paging + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + paging = try container.decode("paging") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(paging, forKey: "paging") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PagingInformation else { return false } + guard self.paging == object.paging else { return false } + return true + } + + public static func == (lhs: PagingInformation, rhs: PagingInformation) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/PerfPowerMetric.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PerfPowerMetric.swift new file mode 100644 index 000000000..6cc8cd11c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PerfPowerMetric.swift @@ -0,0 +1,115 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class PerfPowerMetric: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case perfPowerMetrics = "perfPowerMetrics" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public enum MetricType: String, Codable, Equatable, CaseIterable { + case disk = "DISK" + case hang = "HANG" + case battery = "BATTERY" + case launch = "LAUNCH" + case memory = "MEMORY" + case animation = "ANIMATION" + } + + public enum Platform: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + } + + public var deviceType: String? + + public var metricType: MetricType? + + public var platform: Platform? + + public init(deviceType: String? = nil, metricType: MetricType? = nil, platform: Platform? = nil) { + self.deviceType = deviceType + self.metricType = metricType + self.platform = platform + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + deviceType = try container.decodeIfPresent("deviceType") + metricType = try container.decodeIfPresent("metricType") + platform = try container.decodeIfPresent("platform") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(deviceType, forKey: "deviceType") + try container.encodeIfPresent(metricType, forKey: "metricType") + try container.encodeIfPresent(platform, forKey: "platform") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.deviceType == object.deviceType else { return false } + guard self.metricType == object.metricType else { return false } + guard self.platform == object.platform else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PerfPowerMetric else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: PerfPowerMetric, rhs: PerfPowerMetric) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/PerfPowerMetricsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PerfPowerMetricsResponse.swift new file mode 100644 index 000000000..b1b5c0463 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PerfPowerMetricsResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class PerfPowerMetricsResponse: APIModel { + + public var data: [PerfPowerMetric] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init(data: [PerfPowerMetric], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PerfPowerMetricsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: PerfPowerMetricsResponse, rhs: PerfPowerMetricsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/PhasedReleaseState.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PhasedReleaseState.swift new file mode 100644 index 000000000..37f282099 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PhasedReleaseState.swift @@ -0,0 +1,13 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum PhasedReleaseState: String, Codable, Equatable, CaseIterable { + case inactive = "INACTIVE" + case active = "ACTIVE" + case paused = "PAUSED" + case complete = "COMPLETE" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/Platform.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Platform.swift new file mode 100644 index 000000000..06caa46a9 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Platform.swift @@ -0,0 +1,12 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum Platform: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + case macOs = "MAC_OS" + case tvOs = "TV_OS" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/PreReleaseVersionsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PreReleaseVersionsResponse.swift new file mode 100644 index 000000000..686f80469 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PreReleaseVersionsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class PreReleaseVersionsResponse: APIModel { + + public var data: [PrereleaseVersion] + + public var links: PagedDocumentLinks + + public var included: [Included]? + + public var meta: PagingInformation? + + public init(data: [PrereleaseVersion], links: PagedDocumentLinks, included: [Included]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PreReleaseVersionsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: PreReleaseVersionsResponse, rhs: PreReleaseVersionsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/PrereleaseVersion.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PrereleaseVersion.swift new file mode 100644 index 000000000..2c4179d05 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PrereleaseVersion.swift @@ -0,0 +1,375 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class PrereleaseVersion: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case preReleaseVersions = "preReleaseVersions" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var platform: Platform? + + public var version: String? + + public init(platform: Platform? = nil, version: String? = nil) { + self.platform = platform + self.version = version + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + platform = try container.decodeIfPresent("platform") + version = try container.decodeIfPresent("version") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(platform, forKey: "platform") + try container.encodeIfPresent(version, forKey: "version") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.platform == object.platform else { return false } + guard self.version == object.version else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var app: App? + + public var builds: Builds? + + public class App: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? App else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: App, rhs: App) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Builds: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case builds = "builds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Builds else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: Builds, rhs: Builds) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(app: App? = nil, builds: Builds? = nil) { + self.app = app + self.builds = builds + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + app = try container.decodeIfPresent("app") + builds = try container.decodeIfPresent("builds") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(app, forKey: "app") + try container.encodeIfPresent(builds, forKey: "builds") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.app == object.app else { return false } + guard self.builds == object.builds else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PrereleaseVersion else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: PrereleaseVersion, rhs: PrereleaseVersion) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/PrereleaseVersionResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PrereleaseVersionResponse.swift new file mode 100644 index 000000000..3329f13f3 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PrereleaseVersionResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class PrereleaseVersionResponse: APIModel { + + public var data: PrereleaseVersion + + public var links: DocumentLinks + + public var included: [Included]? + + public init(data: PrereleaseVersion, links: DocumentLinks, included: [Included]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? PrereleaseVersionResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: PrereleaseVersionResponse, rhs: PrereleaseVersionResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/PreviewType.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PreviewType.swift new file mode 100644 index 000000000..749a12fd5 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PreviewType.swift @@ -0,0 +1,24 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum PreviewType: String, Codable, Equatable, CaseIterable { + case iphone65 = "IPHONE_65" + case iphone58 = "IPHONE_58" + case iphone55 = "IPHONE_55" + case iphone47 = "IPHONE_47" + case iphone40 = "IPHONE_40" + case iphone35 = "IPHONE_35" + case ipadPro3gen129 = "IPAD_PRO_3GEN_129" + case ipadPro3gen11 = "IPAD_PRO_3GEN_11" + case ipadPro129 = "IPAD_PRO_129" + case ipad105 = "IPAD_105" + case ipad97 = "IPAD_97" + case desktop = "DESKTOP" + case watchSeries4 = "WATCH_SERIES_4" + case watchSeries3 = "WATCH_SERIES_3" + case appleTv = "APPLE_TV" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/Profile.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Profile.swift new file mode 100644 index 000000000..4022d1a8f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Profile.swift @@ -0,0 +1,560 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class Profile: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case profiles = "profiles" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public enum ProfileState: String, Codable, Equatable, CaseIterable { + case active = "ACTIVE" + case invalid = "INVALID" + } + + public enum ProfileType: String, Codable, Equatable, CaseIterable { + case iosAppDevelopment = "IOS_APP_DEVELOPMENT" + case iosAppStore = "IOS_APP_STORE" + case iosAppAdhoc = "IOS_APP_ADHOC" + case iosAppInhouse = "IOS_APP_INHOUSE" + case macAppDevelopment = "MAC_APP_DEVELOPMENT" + case macAppStore = "MAC_APP_STORE" + case macAppDirect = "MAC_APP_DIRECT" + case tvosAppDevelopment = "TVOS_APP_DEVELOPMENT" + case tvosAppStore = "TVOS_APP_STORE" + case tvosAppAdhoc = "TVOS_APP_ADHOC" + case tvosAppInhouse = "TVOS_APP_INHOUSE" + case macCatalystAppDevelopment = "MAC_CATALYST_APP_DEVELOPMENT" + case macCatalystAppStore = "MAC_CATALYST_APP_STORE" + case macCatalystAppDirect = "MAC_CATALYST_APP_DIRECT" + } + + public var createdDate: DateTime? + + public var expirationDate: DateTime? + + public var name: String? + + public var platform: BundleIdPlatform? + + public var profileContent: String? + + public var profileState: ProfileState? + + public var profileType: ProfileType? + + public var uuid: String? + + public init(createdDate: DateTime? = nil, expirationDate: DateTime? = nil, name: String? = nil, platform: BundleIdPlatform? = nil, profileContent: String? = nil, profileState: ProfileState? = nil, profileType: ProfileType? = nil, uuid: String? = nil) { + self.createdDate = createdDate + self.expirationDate = expirationDate + self.name = name + self.platform = platform + self.profileContent = profileContent + self.profileState = profileState + self.profileType = profileType + self.uuid = uuid + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + createdDate = try container.decodeIfPresent("createdDate") + expirationDate = try container.decodeIfPresent("expirationDate") + name = try container.decodeIfPresent("name") + platform = try container.decodeIfPresent("platform") + profileContent = try container.decodeIfPresent("profileContent") + profileState = try container.decodeIfPresent("profileState") + profileType = try container.decodeIfPresent("profileType") + uuid = try container.decodeIfPresent("uuid") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(createdDate, forKey: "createdDate") + try container.encodeIfPresent(expirationDate, forKey: "expirationDate") + try container.encodeIfPresent(name, forKey: "name") + try container.encodeIfPresent(platform, forKey: "platform") + try container.encodeIfPresent(profileContent, forKey: "profileContent") + try container.encodeIfPresent(profileState, forKey: "profileState") + try container.encodeIfPresent(profileType, forKey: "profileType") + try container.encodeIfPresent(uuid, forKey: "uuid") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.createdDate == object.createdDate else { return false } + guard self.expirationDate == object.expirationDate else { return false } + guard self.name == object.name else { return false } + guard self.platform == object.platform else { return false } + guard self.profileContent == object.profileContent else { return false } + guard self.profileState == object.profileState else { return false } + guard self.profileType == object.profileType else { return false } + guard self.uuid == object.uuid else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var bundleId: BundleId? + + public var certificates: Certificates? + + public var devices: Devices? + + public class BundleId: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case bundleIds = "bundleIds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BundleId else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: BundleId, rhs: BundleId) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Certificates: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case certificates = "certificates" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Certificates else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: Certificates, rhs: Certificates) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Devices: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case devices = "devices" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Devices else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: Devices, rhs: Devices) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(bundleId: BundleId? = nil, certificates: Certificates? = nil, devices: Devices? = nil) { + self.bundleId = bundleId + self.certificates = certificates + self.devices = devices + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + bundleId = try container.decodeIfPresent("bundleId") + certificates = try container.decodeIfPresent("certificates") + devices = try container.decodeIfPresent("devices") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(bundleId, forKey: "bundleId") + try container.encodeIfPresent(certificates, forKey: "certificates") + try container.encodeIfPresent(devices, forKey: "devices") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.bundleId == object.bundleId else { return false } + guard self.certificates == object.certificates else { return false } + guard self.devices == object.devices else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Profile else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: Profile, rhs: Profile) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/ProfileCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ProfileCreateRequest.swift new file mode 100644 index 000000000..241bbe727 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ProfileCreateRequest.swift @@ -0,0 +1,397 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class ProfileCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case profiles = "profiles" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var certificates: Certificates + + public var bundleId: BundleId + + public var devices: Devices? + + public class Certificates: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case certificates = "certificates" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Certificates else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: Certificates, rhs: Certificates) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class BundleId: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case bundleIds = "bundleIds" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? BundleId else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: BundleId, rhs: BundleId) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Devices: APIModel { + + public var data: [DataType]? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case devices = "devices" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Devices else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: Devices, rhs: Devices) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(certificates: Certificates, bundleId: BundleId, devices: Devices? = nil) { + self.certificates = certificates + self.bundleId = bundleId + self.devices = devices + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + certificates = try container.decode("certificates") + bundleId = try container.decode("bundleId") + devices = try container.decodeIfPresent("devices") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(certificates, forKey: "certificates") + try container.encode(bundleId, forKey: "bundleId") + try container.encodeIfPresent(devices, forKey: "devices") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.certificates == object.certificates else { return false } + guard self.bundleId == object.bundleId else { return false } + guard self.devices == object.devices else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public enum ProfileType: String, Codable, Equatable, CaseIterable { + case iosAppDevelopment = "IOS_APP_DEVELOPMENT" + case iosAppStore = "IOS_APP_STORE" + case iosAppAdhoc = "IOS_APP_ADHOC" + case iosAppInhouse = "IOS_APP_INHOUSE" + case macAppDevelopment = "MAC_APP_DEVELOPMENT" + case macAppStore = "MAC_APP_STORE" + case macAppDirect = "MAC_APP_DIRECT" + case tvosAppDevelopment = "TVOS_APP_DEVELOPMENT" + case tvosAppStore = "TVOS_APP_STORE" + case tvosAppAdhoc = "TVOS_APP_ADHOC" + case tvosAppInhouse = "TVOS_APP_INHOUSE" + case macCatalystAppDevelopment = "MAC_CATALYST_APP_DEVELOPMENT" + case macCatalystAppStore = "MAC_CATALYST_APP_STORE" + case macCatalystAppDirect = "MAC_CATALYST_APP_DIRECT" + } + + public var profileType: ProfileType + + public var name: String + + public init(profileType: ProfileType, name: String) { + self.profileType = profileType + self.name = name + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + profileType = try container.decode("profileType") + name = try container.decode("name") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(profileType, forKey: "profileType") + try container.encode(name, forKey: "name") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.profileType == object.profileType else { return false } + guard self.name == object.name else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? ProfileCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: ProfileCreateRequest, rhs: ProfileCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/ProfileResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ProfileResponse.swift new file mode 100644 index 000000000..7bf6dcbe6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ProfileResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class ProfileResponse: APIModel { + + public var data: Profile + + public var links: DocumentLinks + + public var included: [Included]? + + public init(data: Profile, links: DocumentLinks, included: [Included]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? ProfileResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: ProfileResponse, rhs: ProfileResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/ProfilesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ProfilesResponse.swift new file mode 100644 index 000000000..1c879d933 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ProfilesResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class ProfilesResponse: APIModel { + + public var data: [Profile] + + public var links: PagedDocumentLinks + + public var included: [Included]? + + public var meta: PagingInformation? + + public init(data: [Profile], links: PagedDocumentLinks, included: [Included]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? ProfilesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: ProfilesResponse, rhs: ProfilesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/ResourceLinks.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ResourceLinks.swift new file mode 100644 index 000000000..714d6abc6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ResourceLinks.swift @@ -0,0 +1,37 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class ResourceLinks: APIModel { + + public var `self`: String + + public init(`self`: String) { + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + `self` = try container.decode("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? ResourceLinks else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: ResourceLinks, rhs: ResourceLinks) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverage.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverage.swift new file mode 100644 index 000000000..540f204ac --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverage.swift @@ -0,0 +1,266 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class RoutingAppCoverage: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case routingAppCoverages = "routingAppCoverages" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var assetDeliveryState: AppMediaAssetState? + + public var fileName: String? + + public var fileSize: Int? + + public var sourceFileChecksum: String? + + public var uploadOperations: [UploadOperation]? + + public init(assetDeliveryState: AppMediaAssetState? = nil, fileName: String? = nil, fileSize: Int? = nil, sourceFileChecksum: String? = nil, uploadOperations: [UploadOperation]? = nil) { + self.assetDeliveryState = assetDeliveryState + self.fileName = fileName + self.fileSize = fileSize + self.sourceFileChecksum = sourceFileChecksum + self.uploadOperations = uploadOperations + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + assetDeliveryState = try container.decodeIfPresent("assetDeliveryState") + fileName = try container.decodeIfPresent("fileName") + fileSize = try container.decodeIfPresent("fileSize") + sourceFileChecksum = try container.decodeIfPresent("sourceFileChecksum") + uploadOperations = try container.decodeArrayIfPresent("uploadOperations") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(assetDeliveryState, forKey: "assetDeliveryState") + try container.encodeIfPresent(fileName, forKey: "fileName") + try container.encodeIfPresent(fileSize, forKey: "fileSize") + try container.encodeIfPresent(sourceFileChecksum, forKey: "sourceFileChecksum") + try container.encodeIfPresent(uploadOperations, forKey: "uploadOperations") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.assetDeliveryState == object.assetDeliveryState else { return false } + guard self.fileName == object.fileName else { return false } + guard self.fileSize == object.fileSize else { return false } + guard self.sourceFileChecksum == object.sourceFileChecksum else { return false } + guard self.uploadOperations == object.uploadOperations else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var appStoreVersion: AppStoreVersion? + + public class AppStoreVersion: APIModel { + + public var data: DataType? + + public var links: Links? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType? = nil, links: Links? = nil) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeIfPresent("data") + links = try container.decodeIfPresent("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersion else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: AppStoreVersion, rhs: AppStoreVersion) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appStoreVersion: AppStoreVersion? = nil) { + self.appStoreVersion = appStoreVersion + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreVersion = try container.decodeIfPresent("appStoreVersion") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(appStoreVersion, forKey: "appStoreVersion") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appStoreVersion == object.appStoreVersion else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? RoutingAppCoverage else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: RoutingAppCoverage, rhs: RoutingAppCoverage) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverageCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverageCreateRequest.swift new file mode 100644 index 000000000..951516f80 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverageCreateRequest.swift @@ -0,0 +1,224 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class RoutingAppCoverageCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case routingAppCoverages = "routingAppCoverages" + } + + public var relationships: Relationships + + public var attributes: Attributes + + public var type: `Type` + + public class Relationships: APIModel { + + public var appStoreVersion: AppStoreVersion + + public class AppStoreVersion: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? AppStoreVersion else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: AppStoreVersion, rhs: AppStoreVersion) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(appStoreVersion: AppStoreVersion) { + self.appStoreVersion = appStoreVersion + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + appStoreVersion = try container.decode("appStoreVersion") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(appStoreVersion, forKey: "appStoreVersion") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.appStoreVersion == object.appStoreVersion else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Attributes: APIModel { + + public var fileName: String + + public var fileSize: Int + + public init(fileName: String, fileSize: Int) { + self.fileName = fileName + self.fileSize = fileSize + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + fileName = try container.decode("fileName") + fileSize = try container.decode("fileSize") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(fileName, forKey: "fileName") + try container.encode(fileSize, forKey: "fileSize") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.fileName == object.fileName else { return false } + guard self.fileSize == object.fileSize else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(relationships: Relationships, attributes: Attributes, type: `Type`) { + self.relationships = relationships + self.attributes = attributes + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + relationships = try container.decode("relationships") + attributes = try container.decode("attributes") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(relationships, forKey: "relationships") + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.relationships == object.relationships else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? RoutingAppCoverageCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: RoutingAppCoverageCreateRequest, rhs: RoutingAppCoverageCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverageResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverageResponse.swift new file mode 100644 index 000000000..78c2fa8ca --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverageResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class RoutingAppCoverageResponse: APIModel { + + public var data: RoutingAppCoverage + + public var links: DocumentLinks + + public init(data: RoutingAppCoverage, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? RoutingAppCoverageResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: RoutingAppCoverageResponse, rhs: RoutingAppCoverageResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverageUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverageUpdateRequest.swift new file mode 100644 index 000000000..730317d35 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverageUpdateRequest.swift @@ -0,0 +1,121 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class RoutingAppCoverageUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case routingAppCoverages = "routingAppCoverages" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var sourceFileChecksum: String? + + public var uploaded: Bool? + + public init(sourceFileChecksum: String? = nil, uploaded: Bool? = nil) { + self.sourceFileChecksum = sourceFileChecksum + self.uploaded = uploaded + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + sourceFileChecksum = try container.decodeIfPresent("sourceFileChecksum") + uploaded = try container.decodeIfPresent("uploaded") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(sourceFileChecksum, forKey: "sourceFileChecksum") + try container.encodeIfPresent(uploaded, forKey: "uploaded") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.sourceFileChecksum == object.sourceFileChecksum else { return false } + guard self.uploaded == object.uploaded else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil) { + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? RoutingAppCoverageUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: RoutingAppCoverageUpdateRequest, rhs: RoutingAppCoverageUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/ScreenshotDisplayType.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ScreenshotDisplayType.swift new file mode 100644 index 000000000..16edda73e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ScreenshotDisplayType.swift @@ -0,0 +1,34 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum ScreenshotDisplayType: String, Codable, Equatable, CaseIterable { + case appIphone65 = "APP_IPHONE_65" + case appIphone58 = "APP_IPHONE_58" + case appIphone55 = "APP_IPHONE_55" + case appIphone47 = "APP_IPHONE_47" + case appIphone40 = "APP_IPHONE_40" + case appIphone35 = "APP_IPHONE_35" + case appIpadPro3gen129 = "APP_IPAD_PRO_3GEN_129" + case appIpadPro3gen11 = "APP_IPAD_PRO_3GEN_11" + case appIpadPro129 = "APP_IPAD_PRO_129" + case appIpad105 = "APP_IPAD_105" + case appIpad97 = "APP_IPAD_97" + case appDesktop = "APP_DESKTOP" + case appWatchSeries4 = "APP_WATCH_SERIES_4" + case appWatchSeries3 = "APP_WATCH_SERIES_3" + case appAppleTv = "APP_APPLE_TV" + case imessageAppIphone65 = "IMESSAGE_APP_IPHONE_65" + case imessageAppIphone58 = "IMESSAGE_APP_IPHONE_58" + case imessageAppIphone55 = "IMESSAGE_APP_IPHONE_55" + case imessageAppIphone47 = "IMESSAGE_APP_IPHONE_47" + case imessageAppIphone40 = "IMESSAGE_APP_IPHONE_40" + case imessageAppIpadPro3gen129 = "IMESSAGE_APP_IPAD_PRO_3GEN_129" + case imessageAppIpadPro3gen11 = "IMESSAGE_APP_IPAD_PRO_3GEN_11" + case imessageAppIpadPro129 = "IMESSAGE_APP_IPAD_PRO_129" + case imessageAppIpad105 = "IMESSAGE_APP_IPAD_105" + case imessageAppIpad97 = "IMESSAGE_APP_IPAD_97" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/TerritoriesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/TerritoriesResponse.swift new file mode 100644 index 000000000..e63e18cff --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/TerritoriesResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class TerritoriesResponse: APIModel { + + public var data: [Territory] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public init(data: [Territory], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? TerritoriesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: TerritoriesResponse, rhs: TerritoriesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/Territory.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Territory.swift new file mode 100644 index 000000000..33d64a8bf --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Territory.swift @@ -0,0 +1,90 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class Territory: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case territories = "territories" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public class Attributes: APIModel { + + public var currency: String? + + public init(currency: String? = nil) { + self.currency = currency + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + currency = try container.decodeIfPresent("currency") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(currency, forKey: "currency") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.currency == object.currency else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Territory else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + return true + } + + public static func == (lhs: Territory, rhs: Territory) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/TerritoryResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/TerritoryResponse.swift new file mode 100644 index 000000000..4dc61f599 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/TerritoryResponse.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class TerritoryResponse: APIModel { + + public var data: Territory + + public var links: DocumentLinks + + public init(data: Territory, links: DocumentLinks) { + self.data = data + self.links = links + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? TerritoryResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + return true + } + + public static func == (lhs: TerritoryResponse, rhs: TerritoryResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/UploadOperation.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UploadOperation.swift new file mode 100644 index 000000000..a1f09e067 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UploadOperation.swift @@ -0,0 +1,61 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class UploadOperation: APIModel { + + public var length: Int? + + public var method: String? + + public var offset: Int? + + public var requestHeaders: [UploadOperationHeader]? + + public var url: String? + + public init(length: Int? = nil, method: String? = nil, offset: Int? = nil, requestHeaders: [UploadOperationHeader]? = nil, url: String? = nil) { + self.length = length + self.method = method + self.offset = offset + self.requestHeaders = requestHeaders + self.url = url + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + length = try container.decodeIfPresent("length") + method = try container.decodeIfPresent("method") + offset = try container.decodeIfPresent("offset") + requestHeaders = try container.decodeArrayIfPresent("requestHeaders") + url = try container.decodeIfPresent("url") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(length, forKey: "length") + try container.encodeIfPresent(method, forKey: "method") + try container.encodeIfPresent(offset, forKey: "offset") + try container.encodeIfPresent(requestHeaders, forKey: "requestHeaders") + try container.encodeIfPresent(url, forKey: "url") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? UploadOperation else { return false } + guard self.length == object.length else { return false } + guard self.method == object.method else { return false } + guard self.offset == object.offset else { return false } + guard self.requestHeaders == object.requestHeaders else { return false } + guard self.url == object.url else { return false } + return true + } + + public static func == (lhs: UploadOperation, rhs: UploadOperation) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/UploadOperationHeader.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UploadOperationHeader.swift new file mode 100644 index 000000000..871fe0f83 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UploadOperationHeader.swift @@ -0,0 +1,43 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class UploadOperationHeader: APIModel { + + public var name: String? + + public var value: String? + + public init(name: String? = nil, value: String? = nil) { + self.name = name + self.value = value + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + name = try container.decodeIfPresent("name") + value = try container.decodeIfPresent("value") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(name, forKey: "name") + try container.encodeIfPresent(value, forKey: "value") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? UploadOperationHeader else { return false } + guard self.name == object.name else { return false } + guard self.value == object.value else { return false } + return true + } + + public static func == (lhs: UploadOperationHeader, rhs: UploadOperationHeader) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/User.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/User.swift new file mode 100644 index 000000000..9702970cf --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/User.swift @@ -0,0 +1,278 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class User: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case users = "users" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var allAppsVisible: Bool? + + public var firstName: String? + + public var lastName: String? + + public var provisioningAllowed: Bool? + + public var roles: [UserRole]? + + public var username: String? + + public init(allAppsVisible: Bool? = nil, firstName: String? = nil, lastName: String? = nil, provisioningAllowed: Bool? = nil, roles: [UserRole]? = nil, username: String? = nil) { + self.allAppsVisible = allAppsVisible + self.firstName = firstName + self.lastName = lastName + self.provisioningAllowed = provisioningAllowed + self.roles = roles + self.username = username + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + allAppsVisible = try container.decodeIfPresent("allAppsVisible") + firstName = try container.decodeIfPresent("firstName") + lastName = try container.decodeIfPresent("lastName") + provisioningAllowed = try container.decodeIfPresent("provisioningAllowed") + roles = try container.decodeArrayIfPresent("roles") + username = try container.decodeIfPresent("username") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(allAppsVisible, forKey: "allAppsVisible") + try container.encodeIfPresent(firstName, forKey: "firstName") + try container.encodeIfPresent(lastName, forKey: "lastName") + try container.encodeIfPresent(provisioningAllowed, forKey: "provisioningAllowed") + try container.encodeIfPresent(roles, forKey: "roles") + try container.encodeIfPresent(username, forKey: "username") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.allAppsVisible == object.allAppsVisible else { return false } + guard self.firstName == object.firstName else { return false } + guard self.lastName == object.lastName else { return false } + guard self.provisioningAllowed == object.provisioningAllowed else { return false } + guard self.roles == object.roles else { return false } + guard self.username == object.username else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var visibleApps: VisibleApps? + + public class VisibleApps: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? VisibleApps else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: VisibleApps, rhs: VisibleApps) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(visibleApps: VisibleApps? = nil) { + self.visibleApps = visibleApps + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + visibleApps = try container.decodeIfPresent("visibleApps") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(visibleApps, forKey: "visibleApps") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.visibleApps == object.visibleApps else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? User else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: User, rhs: User) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitation.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitation.swift new file mode 100644 index 000000000..cfeeee742 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitation.swift @@ -0,0 +1,284 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class UserInvitation: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case userInvitations = "userInvitations" + } + + public var links: ResourceLinks + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var allAppsVisible: Bool? + + public var email: String? + + public var expirationDate: DateTime? + + public var firstName: String? + + public var lastName: String? + + public var provisioningAllowed: Bool? + + public var roles: [UserRole]? + + public init(allAppsVisible: Bool? = nil, email: String? = nil, expirationDate: DateTime? = nil, firstName: String? = nil, lastName: String? = nil, provisioningAllowed: Bool? = nil, roles: [UserRole]? = nil) { + self.allAppsVisible = allAppsVisible + self.email = email + self.expirationDate = expirationDate + self.firstName = firstName + self.lastName = lastName + self.provisioningAllowed = provisioningAllowed + self.roles = roles + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + allAppsVisible = try container.decodeIfPresent("allAppsVisible") + email = try container.decodeIfPresent("email") + expirationDate = try container.decodeIfPresent("expirationDate") + firstName = try container.decodeIfPresent("firstName") + lastName = try container.decodeIfPresent("lastName") + provisioningAllowed = try container.decodeIfPresent("provisioningAllowed") + roles = try container.decodeArrayIfPresent("roles") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(allAppsVisible, forKey: "allAppsVisible") + try container.encodeIfPresent(email, forKey: "email") + try container.encodeIfPresent(expirationDate, forKey: "expirationDate") + try container.encodeIfPresent(firstName, forKey: "firstName") + try container.encodeIfPresent(lastName, forKey: "lastName") + try container.encodeIfPresent(provisioningAllowed, forKey: "provisioningAllowed") + try container.encodeIfPresent(roles, forKey: "roles") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.allAppsVisible == object.allAppsVisible else { return false } + guard self.email == object.email else { return false } + guard self.expirationDate == object.expirationDate else { return false } + guard self.firstName == object.firstName else { return false } + guard self.lastName == object.lastName else { return false } + guard self.provisioningAllowed == object.provisioningAllowed else { return false } + guard self.roles == object.roles else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var visibleApps: VisibleApps? + + public class VisibleApps: APIModel { + + public var data: [DataType]? + + public var links: Links? + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Links: APIModel { + + public var related: String? + + public var `self`: String? + + public init(related: String? = nil, `self`: String? = nil) { + self.related = related + self.`self` = `self` + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + related = try container.decodeIfPresent("related") + `self` = try container.decodeIfPresent("self") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(related, forKey: "related") + try container.encodeIfPresent(`self`, forKey: "self") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Links else { return false } + guard self.related == object.related else { return false } + guard self.`self` == object.`self` else { return false } + return true + } + + public static func == (lhs: Links, rhs: Links) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil, links: Links? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + links = try container.decodeIfPresent("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + try container.encodeIfPresent(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? VisibleApps else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: VisibleApps, rhs: VisibleApps) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(visibleApps: VisibleApps? = nil) { + self.visibleApps = visibleApps + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + visibleApps = try container.decodeIfPresent("visibleApps") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(visibleApps, forKey: "visibleApps") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.visibleApps == object.visibleApps else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(links: ResourceLinks, id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.links = links + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + links = try container.decode("links") + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(links, forKey: "links") + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? UserInvitation else { return false } + guard self.links == object.links else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: UserInvitation, rhs: UserInvitation) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitationCreateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitationCreateRequest.swift new file mode 100644 index 000000000..07e1fd3c6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitationCreateRequest.swift @@ -0,0 +1,248 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class UserInvitationCreateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case userInvitations = "userInvitations" + } + + public var attributes: Attributes + + public var type: `Type` + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var firstName: String + + public var lastName: String + + public var roles: [UserRole] + + public var email: String + + public var allAppsVisible: Bool? + + public var provisioningAllowed: Bool? + + public init(firstName: String, lastName: String, roles: [UserRole], email: String, allAppsVisible: Bool? = nil, provisioningAllowed: Bool? = nil) { + self.firstName = firstName + self.lastName = lastName + self.roles = roles + self.email = email + self.allAppsVisible = allAppsVisible + self.provisioningAllowed = provisioningAllowed + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + firstName = try container.decode("firstName") + lastName = try container.decode("lastName") + roles = try container.decodeArray("roles") + email = try container.decode("email") + allAppsVisible = try container.decodeIfPresent("allAppsVisible") + provisioningAllowed = try container.decodeIfPresent("provisioningAllowed") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(firstName, forKey: "firstName") + try container.encode(lastName, forKey: "lastName") + try container.encode(roles, forKey: "roles") + try container.encode(email, forKey: "email") + try container.encodeIfPresent(allAppsVisible, forKey: "allAppsVisible") + try container.encodeIfPresent(provisioningAllowed, forKey: "provisioningAllowed") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.firstName == object.firstName else { return false } + guard self.lastName == object.lastName else { return false } + guard self.roles == object.roles else { return false } + guard self.email == object.email else { return false } + guard self.allAppsVisible == object.allAppsVisible else { return false } + guard self.provisioningAllowed == object.provisioningAllowed else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var visibleApps: VisibleApps? + + public class VisibleApps: APIModel { + + public var data: [DataType]? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? VisibleApps else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: VisibleApps, rhs: VisibleApps) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(visibleApps: VisibleApps? = nil) { + self.visibleApps = visibleApps + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + visibleApps = try container.decodeIfPresent("visibleApps") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(visibleApps, forKey: "visibleApps") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.visibleApps == object.visibleApps else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(attributes: Attributes, type: `Type`, relationships: Relationships? = nil) { + self.attributes = attributes + self.type = type + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + attributes = try container.decode("attributes") + type = try container.decode("type") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(attributes, forKey: "attributes") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.attributes == object.attributes else { return false } + guard self.type == object.type else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? UserInvitationCreateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: UserInvitationCreateRequest, rhs: UserInvitationCreateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitationResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitationResponse.swift new file mode 100644 index 000000000..4600da296 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitationResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class UserInvitationResponse: APIModel { + + public var data: UserInvitation + + public var links: DocumentLinks + + public var included: [App]? + + public init(data: UserInvitation, links: DocumentLinks, included: [App]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? UserInvitationResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: UserInvitationResponse, rhs: UserInvitationResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitationsResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitationsResponse.swift new file mode 100644 index 000000000..9856c860c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitationsResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class UserInvitationsResponse: APIModel { + + public var data: [UserInvitation] + + public var links: PagedDocumentLinks + + public var included: [App]? + + public var meta: PagingInformation? + + public init(data: [UserInvitation], links: PagedDocumentLinks, included: [App]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? UserInvitationsResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: UserInvitationsResponse, rhs: UserInvitationsResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserResponse.swift new file mode 100644 index 000000000..e75ab6759 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserResponse.swift @@ -0,0 +1,49 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class UserResponse: APIModel { + + public var data: User + + public var links: DocumentLinks + + public var included: [App]? + + public init(data: User, links: DocumentLinks, included: [App]? = nil) { + self.data = data + self.links = links + self.included = included + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? UserResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + return true + } + + public static func == (lhs: UserResponse, rhs: UserResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserRole.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserRole.swift new file mode 100644 index 000000000..ff41bb81b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserRole.swift @@ -0,0 +1,20 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public enum UserRole: String, Codable, Equatable, CaseIterable { + case admin = "ADMIN" + case finance = "FINANCE" + case technical = "TECHNICAL" + case accountHolder = "ACCOUNT_HOLDER" + case readOnly = "READ_ONLY" + case sales = "SALES" + case marketing = "MARKETING" + case appManager = "APP_MANAGER" + case developer = "DEVELOPER" + case accessToReports = "ACCESS_TO_REPORTS" + case customerSupport = "CUSTOMER_SUPPORT" +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserUpdateRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserUpdateRequest.swift new file mode 100644 index 000000000..62185fed1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserUpdateRequest.swift @@ -0,0 +1,236 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class UserUpdateRequest: APIModel { + + public var data: DataType + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case users = "users" + } + + public var id: String + + public var type: `Type` + + public var attributes: Attributes? + + public var relationships: Relationships? + + public class Attributes: APIModel { + + public var allAppsVisible: Bool? + + public var provisioningAllowed: Bool? + + public var roles: [UserRole]? + + public init(allAppsVisible: Bool? = nil, provisioningAllowed: Bool? = nil, roles: [UserRole]? = nil) { + self.allAppsVisible = allAppsVisible + self.provisioningAllowed = provisioningAllowed + self.roles = roles + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + allAppsVisible = try container.decodeIfPresent("allAppsVisible") + provisioningAllowed = try container.decodeIfPresent("provisioningAllowed") + roles = try container.decodeArrayIfPresent("roles") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(allAppsVisible, forKey: "allAppsVisible") + try container.encodeIfPresent(provisioningAllowed, forKey: "provisioningAllowed") + try container.encodeIfPresent(roles, forKey: "roles") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Attributes else { return false } + guard self.allAppsVisible == object.allAppsVisible else { return false } + guard self.provisioningAllowed == object.provisioningAllowed else { return false } + guard self.roles == object.roles else { return false } + return true + } + + public static func == (lhs: Attributes, rhs: Attributes) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public class Relationships: APIModel { + + public var visibleApps: VisibleApps? + + public class VisibleApps: APIModel { + + public var data: [DataType]? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]? = nil) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArrayIfPresent("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? VisibleApps else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: VisibleApps, rhs: VisibleApps) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(visibleApps: VisibleApps? = nil) { + self.visibleApps = visibleApps + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + visibleApps = try container.decodeIfPresent("visibleApps") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encodeIfPresent(visibleApps, forKey: "visibleApps") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? Relationships else { return false } + guard self.visibleApps == object.visibleApps else { return false } + return true + } + + public static func == (lhs: Relationships, rhs: Relationships) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(id: String, type: `Type`, attributes: Attributes? = nil, relationships: Relationships? = nil) { + self.id = id + self.type = type + self.attributes = attributes + self.relationships = relationships + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + attributes = try container.decodeIfPresent("attributes") + relationships = try container.decodeIfPresent("relationships") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + try container.encodeIfPresent(attributes, forKey: "attributes") + try container.encodeIfPresent(relationships, forKey: "relationships") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + guard self.attributes == object.attributes else { return false } + guard self.relationships == object.relationships else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: DataType) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decode("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? UserUpdateRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: UserUpdateRequest, rhs: UserUpdateRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserVisibleAppsLinkagesRequest.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserVisibleAppsLinkagesRequest.swift new file mode 100644 index 000000000..a3eb20a78 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserVisibleAppsLinkagesRequest.swift @@ -0,0 +1,78 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class UserVisibleAppsLinkagesRequest: APIModel { + + public var data: [DataType] + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType]) { + self.data = data + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? UserVisibleAppsLinkagesRequest else { return false } + guard self.data == object.data else { return false } + return true + } + + public static func == (lhs: UserVisibleAppsLinkagesRequest, rhs: UserVisibleAppsLinkagesRequest) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserVisibleAppsLinkagesResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserVisibleAppsLinkagesResponse.swift new file mode 100644 index 000000000..092932b2d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserVisibleAppsLinkagesResponse.swift @@ -0,0 +1,90 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class UserVisibleAppsLinkagesResponse: APIModel { + + public var data: [DataType] + + public var links: PagedDocumentLinks + + public var meta: PagingInformation? + + public class DataType: APIModel { + + public enum `Type`: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public var id: String + + public var type: `Type` + + public init(id: String, type: `Type`) { + self.id = id + self.type = type + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + id = try container.decode("id") + type = try container.decode("type") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(id, forKey: "id") + try container.encode(type, forKey: "type") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? DataType else { return false } + guard self.id == object.id else { return false } + guard self.type == object.type else { return false } + return true + } + + public static func == (lhs: DataType, rhs: DataType) -> Bool { + return lhs.isEqual(to: rhs) + } + } + + public init(data: [DataType], links: PagedDocumentLinks, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? UserVisibleAppsLinkagesResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: UserVisibleAppsLinkagesResponse, rhs: UserVisibleAppsLinkagesResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/UsersResponse.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UsersResponse.swift new file mode 100644 index 000000000..3691a0026 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UsersResponse.swift @@ -0,0 +1,55 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public class UsersResponse: APIModel { + + public var data: [User] + + public var links: PagedDocumentLinks + + public var included: [App]? + + public var meta: PagingInformation? + + public init(data: [User], links: PagedDocumentLinks, included: [App]? = nil, meta: PagingInformation? = nil) { + self.data = data + self.links = links + self.included = included + self.meta = meta + } + + public required init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: StringCodingKey.self) + + data = try container.decodeArray("data") + links = try container.decode("links") + included = try container.decodeArrayIfPresent("included") + meta = try container.decodeIfPresent("meta") + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: StringCodingKey.self) + + try container.encode(data, forKey: "data") + try container.encode(links, forKey: "links") + try container.encodeIfPresent(included, forKey: "included") + try container.encodeIfPresent(meta, forKey: "meta") + } + + public func isEqual(to object: Any?) -> Bool { + guard let object = object as? UsersResponse else { return false } + guard self.data == object.data else { return false } + guard self.links == object.links else { return false } + guard self.included == object.included else { return false } + guard self.meta == object.meta else { return false } + return true + } + + public static func == (lhs: UsersResponse, rhs: UsersResponse) -> Bool { + return lhs.isEqual(to: rhs) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/RequestBehaviour.swift b/Specs/AppStoreConnect/generated/Swift/Sources/RequestBehaviour.swift new file mode 100644 index 000000000..f3fea767f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/RequestBehaviour.swift @@ -0,0 +1,192 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +public protocol RequestBehaviour { + + /// runs first and allows the requests to be modified. If modifying asynchronously use validate + func modifyRequest(request: AnyRequest, urlRequest: URLRequest) -> URLRequest + + /// validates and modifies the request. complete must be called with either .success or .fail + func validate(request: AnyRequest, urlRequest: URLRequest, complete: @escaping (RequestValidationResult) -> Void) + + /// called before request is sent + func beforeSend(request: AnyRequest) + + /// called when request successfuly returns a 200 range response + func onSuccess(request: AnyRequest, result: Any) + + /// called when request fails with an error. This will not be called if the request returns a known response even if the a status code is out of the 200 range + func onFailure(request: AnyRequest, error: APIClientError) + + /// called if the request recieves a network response. This is not called if request fails validation or encoding + func onResponse(request: AnyRequest, response: AnyResponse) +} + +public enum RequestValidationResult { + case success(URLRequest) + case failure(Error) +} + +// Provides empty defaults so that each function becomes optional +public extension RequestBehaviour { + func modifyRequest(request: AnyRequest, urlRequest: URLRequest) -> URLRequest { return urlRequest } + func validate(request: AnyRequest, urlRequest: URLRequest, complete: @escaping (RequestValidationResult) -> Void) { + complete(.success(urlRequest)) + } + func beforeSend(request: AnyRequest) {} + func onSuccess(request: AnyRequest, result: Any) {} + func onFailure(request: AnyRequest, error: APIClientError) {} + func onResponse(request: AnyRequest, response: AnyResponse) {} +} + +// Group different RequestBehaviours together +struct RequestBehaviourGroup { + + let request: AnyRequest + let behaviours: [RequestBehaviour] + + init(request: APIRequest, behaviours: [RequestBehaviour]) { + self.request = request.asAny() + self.behaviours = behaviours + } + + func beforeSend() { + behaviours.forEach { + $0.beforeSend(request: request) + } + } + + func validate(_ urlRequest: URLRequest, complete: @escaping (RequestValidationResult) -> Void) { + if behaviours.isEmpty { + complete(.success(urlRequest)) + return + } + + var count = 0 + var modifiedRequest = urlRequest + func validateNext() { + let behaviour = behaviours[count] + behaviour.validate(request: request, urlRequest: modifiedRequest) { result in + count += 1 + switch result { + case .success(let urlRequest): + modifiedRequest = urlRequest + if count == self.behaviours.count { + complete(.success(modifiedRequest)) + } else { + validateNext() + } + case .failure(let error): + complete(.failure(error)) + } + } + } + validateNext() + } + + func onSuccess(result: Any) { + behaviours.forEach { + $0.onSuccess(request: request, result: result) + } + } + + func onFailure(error: APIClientError) { + behaviours.forEach { + $0.onFailure(request: request, error: error) + } + } + + func onResponse(response: AnyResponse) { + behaviours.forEach { + $0.onResponse(request: request, response: response) + } + } + + func modifyRequest(_ urlRequest: URLRequest) -> URLRequest { + var urlRequest = urlRequest + behaviours.forEach { + urlRequest = $0.modifyRequest(request: request, urlRequest: urlRequest) + } + return urlRequest + } +} + +//MARK: Type erased Requests and Responses + +public typealias AnyResponse = APIResponse + +public class AnyRequest: APIRequest { + private let requestPath: String + + override public var path: String { + return requestPath + } + + init(request: APIRequest) { + requestPath = request.path + super.init(service: request.service.asAny(), queryParameters: request.queryParameters, formParameters: request.formParameters, headers: request.headers, encodeBody: request.encodeBody) + } +} + +public struct AnyResponseValue: APIResponseValue, CustomDebugStringConvertible, CustomStringConvertible { + + public typealias SuccessType = Any + + public let statusCode: Int + public let successful: Bool + public let response: Any + public let responseEnum: Any + public let success: Any? + + public init(statusCode: Int, successful: Bool, response: Any, responseEnum: Any, success: Any?) { + self.statusCode = statusCode + self.successful = successful + self.response = response + self.responseEnum = responseEnum + self.success = success + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + fatalError() + } + + public var description:String { + return "\(responseEnum)" + } + + public var debugDescription: String { + if let debugDescription = responseEnum as? CustomDebugStringConvertible { + return debugDescription.debugDescription + } else { + return "\(responseEnum)" + } + } +} + +extension APIResponseValue { + public func asAny() -> AnyResponseValue { + return AnyResponseValue(statusCode: statusCode, successful: successful, response: response, responseEnum: self, success: success) + } +} + +extension APIResponse { + public func asAny() -> APIResponse { + return APIResponse(request: request.asAny(), result: result.map{ $0.asAny() }, urlRequest: urlRequest, urlResponse: urlResponse, data: data, timeline: timeline) + } +} + +extension APIRequest { + public func asAny() -> AnyRequest { + return AnyRequest(request: self) + } +} + +extension APIService { + public func asAny() -> APIService { + return APIService(id: id, tag: tag, method: method, path: path, hasBody: hasBody, securityRequirements: securityRequirements) + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AgeRatingDeclarations/AgeRatingDeclarationsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AgeRatingDeclarations/AgeRatingDeclarationsUpdateInstance.swift new file mode 100644 index 000000000..b71fe78f1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AgeRatingDeclarations/AgeRatingDeclarationsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AgeRatingDeclarations { + + public enum AgeRatingDeclarationsUpdateInstance { + + public static let service = APIService(id: "ageRatingDeclarations-update_instance", tag: "AgeRatingDeclarations", method: "PATCH", path: "/v1/ageRatingDeclarations/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AgeRatingDeclarationUpdateRequest + + public init(body: AgeRatingDeclarationUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AgeRatingDeclarationsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AgeRatingDeclarationUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AgeRatingDeclarationResponse + + /** Single AgeRatingDeclaration */ + case status200(AgeRatingDeclarationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AgeRatingDeclarationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AgeRatingDeclarationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesGetCollection.swift new file mode 100644 index 000000000..6d765d651 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesGetCollection.swift @@ -0,0 +1,188 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppCategories { + + public enum AppCategoriesGetCollection { + + public static let service = APIService(id: "appCategories-get_collection", tag: "AppCategories", method: "GET", path: "/v1/appCategories", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'platforms' */ + public enum Filterplatforms: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + case macOs = "MAC_OS" + case tvOs = "TV_OS" + } + + /** the fields to include for returned resources of type appCategories */ + public enum FieldsappCategories: String, Codable, Equatable, CaseIterable { + case parent = "parent" + case platforms = "platforms" + case subcategories = "subcategories" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case parent = "parent" + case subcategories = "subcategories" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'platforms' */ + public var filterplatforms: [Filterplatforms]? + + /** filter by existence or non-existence of related 'parent' */ + public var existsparent: [String]? + + /** the fields to include for returned resources of type appCategories */ + public var fieldsappCategories: [FieldsappCategories]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** maximum number of related subcategories returned (when they are included) */ + public var limitsubcategories: Int? + + public init(filterplatforms: [Filterplatforms]? = nil, existsparent: [String]? = nil, fieldsappCategories: [FieldsappCategories]? = nil, limit: Int? = nil, include: [Include]? = nil, limitsubcategories: Int? = nil) { + self.filterplatforms = filterplatforms + self.existsparent = existsparent + self.fieldsappCategories = fieldsappCategories + self.limit = limit + self.include = include + self.limitsubcategories = limitsubcategories + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppCategoriesGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterplatforms: [Filterplatforms]? = nil, existsparent: [String]? = nil, fieldsappCategories: [FieldsappCategories]? = nil, limit: Int? = nil, include: [Include]? = nil, limitsubcategories: Int? = nil) { + let options = Options(filterplatforms: filterplatforms, existsparent: existsparent, fieldsappCategories: fieldsappCategories, limit: limit, include: include, limitsubcategories: limitsubcategories) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterplatforms = options.filterplatforms?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[platforms]"] = filterplatforms + } + if let existsparent = options.existsparent?.joined(separator: ",") { + params["exists[parent]"] = existsparent + } + if let fieldsappCategories = options.fieldsappCategories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appCategories]"] = fieldsappCategories + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let limitsubcategories = options.limitsubcategories { + params["limit[subcategories]"] = limitsubcategories + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppCategoriesResponse + + /** List of AppCategories */ + case status200(AppCategoriesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: AppCategoriesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppCategoriesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesGetInstance.swift new file mode 100644 index 000000000..46202c247 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesGetInstance.swift @@ -0,0 +1,176 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppCategories { + + public enum AppCategoriesGetInstance { + + public static let service = APIService(id: "appCategories-get_instance", tag: "AppCategories", method: "GET", path: "/v1/appCategories/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appCategories */ + public enum FieldsappCategories: String, Codable, Equatable, CaseIterable { + case parent = "parent" + case platforms = "platforms" + case subcategories = "subcategories" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case parent = "parent" + case subcategories = "subcategories" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appCategories */ + public var fieldsappCategories: [FieldsappCategories]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** maximum number of related subcategories returned (when they are included) */ + public var limitsubcategories: Int? + + public init(id: String, fieldsappCategories: [FieldsappCategories]? = nil, include: [Include]? = nil, limitsubcategories: Int? = nil) { + self.id = id + self.fieldsappCategories = fieldsappCategories + self.include = include + self.limitsubcategories = limitsubcategories + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppCategoriesGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappCategories: [FieldsappCategories]? = nil, include: [Include]? = nil, limitsubcategories: Int? = nil) { + let options = Options(id: id, fieldsappCategories: fieldsappCategories, include: include, limitsubcategories: limitsubcategories) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappCategories = options.fieldsappCategories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appCategories]"] = fieldsappCategories + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let limitsubcategories = options.limitsubcategories { + params["limit[subcategories]"] = limitsubcategories + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppCategoryResponse + + /** Single AppCategory */ + case status200(AppCategoryResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppCategoryResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppCategoryResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesParentGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesParentGetToOneRelated.swift new file mode 100644 index 000000000..15d96a5dd --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesParentGetToOneRelated.swift @@ -0,0 +1,156 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppCategories { + + public enum AppCategoriesParentGetToOneRelated { + + public static let service = APIService(id: "appCategories-parent-get_to_one_related", tag: "AppCategories", method: "GET", path: "/v1/appCategories/{id}/parent", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appCategories */ + public enum FieldsappCategories: String, Codable, Equatable, CaseIterable { + case parent = "parent" + case platforms = "platforms" + case subcategories = "subcategories" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appCategories */ + public var fieldsappCategories: [FieldsappCategories]? + + public init(id: String, fieldsappCategories: [FieldsappCategories]? = nil) { + self.id = id + self.fieldsappCategories = fieldsappCategories + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppCategoriesParentGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappCategories: [FieldsappCategories]? = nil) { + let options = Options(id: id, fieldsappCategories: fieldsappCategories) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappCategories = options.fieldsappCategories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appCategories]"] = fieldsappCategories + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppCategoryResponse + + /** Related resource */ + case status200(AppCategoryResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppCategoryResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppCategoryResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesSubcategoriesGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesSubcategoriesGetToManyRelated.swift new file mode 100644 index 000000000..271d16589 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppCategories/AppCategoriesSubcategoriesGetToManyRelated.swift @@ -0,0 +1,163 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppCategories { + + public enum AppCategoriesSubcategoriesGetToManyRelated { + + public static let service = APIService(id: "appCategories-subcategories-get_to_many_related", tag: "AppCategories", method: "GET", path: "/v1/appCategories/{id}/subcategories", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appCategories */ + public enum FieldsappCategories: String, Codable, Equatable, CaseIterable { + case parent = "parent" + case platforms = "platforms" + case subcategories = "subcategories" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appCategories */ + public var fieldsappCategories: [FieldsappCategories]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsappCategories: [FieldsappCategories]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsappCategories = fieldsappCategories + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppCategoriesSubcategoriesGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappCategories: [FieldsappCategories]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsappCategories: fieldsappCategories, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappCategories = options.fieldsappCategories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appCategories]"] = fieldsappCategories + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppCategoriesResponse + + /** List of related resources */ + case status200(AppCategoriesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppCategoriesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppCategoriesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsAppGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsAppGetToOneRelated.swift new file mode 100644 index 000000000..3ddf56a52 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsAppGetToOneRelated.swift @@ -0,0 +1,176 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppEncryptionDeclarations { + + public enum AppEncryptionDeclarationsAppGetToOneRelated { + + public static let service = APIService(id: "appEncryptionDeclarations-app-get_to_one_related", tag: "AppEncryptionDeclarations", method: "GET", path: "/v1/appEncryptionDeclarations/{id}/app", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(id: String, fieldsapps: [Fieldsapps]? = nil) { + self.id = id + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppEncryptionDeclarationsAppGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(id: id, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppResponse + + /** Related resource */ + case status200(AppResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsBuildsCreateToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsBuildsCreateToManyRelationship.swift new file mode 100644 index 000000000..33530026b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsBuildsCreateToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppEncryptionDeclarations { + + public enum AppEncryptionDeclarationsBuildsCreateToManyRelationship { + + public static let service = APIService(id: "appEncryptionDeclarations-builds-create_to_many_relationship", tag: "AppEncryptionDeclarations", method: "POST", path: "/v1/appEncryptionDeclarations/{id}/relationships/builds", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppEncryptionDeclarationBuildsLinkagesRequest + + public init(body: AppEncryptionDeclarationBuildsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppEncryptionDeclarationsBuildsCreateToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppEncryptionDeclarationBuildsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsGetCollection.swift new file mode 100644 index 000000000..ee5b16ff1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsGetCollection.swift @@ -0,0 +1,232 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppEncryptionDeclarations { + + public enum AppEncryptionDeclarationsGetCollection { + + public static let service = APIService(id: "appEncryptionDeclarations-get_collection", tag: "AppEncryptionDeclarations", method: "GET", path: "/v1/appEncryptionDeclarations", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'platform' */ + public enum Filterplatform: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + case macOs = "MAC_OS" + case tvOs = "TV_OS" + } + + /** the fields to include for returned resources of type appEncryptionDeclarations */ + public enum FieldsappEncryptionDeclarations: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclarationState = "appEncryptionDeclarationState" + case availableOnFrenchStore = "availableOnFrenchStore" + case builds = "builds" + case codeValue = "codeValue" + case containsProprietaryCryptography = "containsProprietaryCryptography" + case containsThirdPartyCryptography = "containsThirdPartyCryptography" + case documentName = "documentName" + case documentType = "documentType" + case documentUrl = "documentUrl" + case exempt = "exempt" + case platform = "platform" + case uploadedDate = "uploadedDate" + case usesEncryption = "usesEncryption" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'platform' */ + public var filterplatform: [Filterplatform]? + + /** filter by id(s) of related 'app' */ + public var filterapp: [String]? + + /** filter by id(s) of related 'builds' */ + public var filterbuilds: [String]? + + /** the fields to include for returned resources of type appEncryptionDeclarations */ + public var fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(filterplatform: [Filterplatform]? = nil, filterapp: [String]? = nil, filterbuilds: [String]? = nil, fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + self.filterplatform = filterplatform + self.filterapp = filterapp + self.filterbuilds = filterbuilds + self.fieldsappEncryptionDeclarations = fieldsappEncryptionDeclarations + self.limit = limit + self.include = include + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppEncryptionDeclarationsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterplatform: [Filterplatform]? = nil, filterapp: [String]? = nil, filterbuilds: [String]? = nil, fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(filterplatform: filterplatform, filterapp: filterapp, filterbuilds: filterbuilds, fieldsappEncryptionDeclarations: fieldsappEncryptionDeclarations, limit: limit, include: include, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterplatform = options.filterplatform?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[platform]"] = filterplatform + } + if let filterapp = options.filterapp?.joined(separator: ",") { + params["filter[app]"] = filterapp + } + if let filterbuilds = options.filterbuilds?.joined(separator: ",") { + params["filter[builds]"] = filterbuilds + } + if let fieldsappEncryptionDeclarations = options.fieldsappEncryptionDeclarations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appEncryptionDeclarations]"] = fieldsappEncryptionDeclarations + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppEncryptionDeclarationsResponse + + /** List of AppEncryptionDeclarations */ + case status200(AppEncryptionDeclarationsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: AppEncryptionDeclarationsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppEncryptionDeclarationsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsGetInstance.swift new file mode 100644 index 000000000..63669d46f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppEncryptionDeclarations/AppEncryptionDeclarationsGetInstance.swift @@ -0,0 +1,213 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppEncryptionDeclarations { + + public enum AppEncryptionDeclarationsGetInstance { + + public static let service = APIService(id: "appEncryptionDeclarations-get_instance", tag: "AppEncryptionDeclarations", method: "GET", path: "/v1/appEncryptionDeclarations/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appEncryptionDeclarations */ + public enum FieldsappEncryptionDeclarations: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclarationState = "appEncryptionDeclarationState" + case availableOnFrenchStore = "availableOnFrenchStore" + case builds = "builds" + case codeValue = "codeValue" + case containsProprietaryCryptography = "containsProprietaryCryptography" + case containsThirdPartyCryptography = "containsThirdPartyCryptography" + case documentName = "documentName" + case documentType = "documentType" + case documentUrl = "documentUrl" + case exempt = "exempt" + case platform = "platform" + case uploadedDate = "uploadedDate" + case usesEncryption = "usesEncryption" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appEncryptionDeclarations */ + public var fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(id: String, fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + self.id = id + self.fieldsappEncryptionDeclarations = fieldsappEncryptionDeclarations + self.include = include + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppEncryptionDeclarationsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(id: id, fieldsappEncryptionDeclarations: fieldsappEncryptionDeclarations, include: include, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappEncryptionDeclarations = options.fieldsappEncryptionDeclarations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appEncryptionDeclarations]"] = fieldsappEncryptionDeclarations + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppEncryptionDeclarationResponse + + /** Single AppEncryptionDeclaration */ + case status200(AppEncryptionDeclarationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppEncryptionDeclarationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppEncryptionDeclarationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsCreateInstance.swift new file mode 100644 index 000000000..5a304d879 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppInfoLocalizations { + + public enum AppInfoLocalizationsCreateInstance { + + public static let service = APIService(id: "appInfoLocalizations-create_instance", tag: "AppInfoLocalizations", method: "POST", path: "/v1/appInfoLocalizations", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: AppInfoLocalizationCreateRequest + + public init(body: AppInfoLocalizationCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: AppInfoLocalizationsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppInfoLocalizationResponse + + /** Single AppInfoLocalization */ + case status201(AppInfoLocalizationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppInfoLocalizationResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(AppInfoLocalizationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsDeleteInstance.swift new file mode 100644 index 000000000..59af48e7b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppInfoLocalizations { + + public enum AppInfoLocalizationsDeleteInstance { + + public static let service = APIService(id: "appInfoLocalizations-delete_instance", tag: "AppInfoLocalizations", method: "DELETE", path: "/v1/appInfoLocalizations/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppInfoLocalizationsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsGetInstance.swift new file mode 100644 index 000000000..80629fa50 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsGetInstance.swift @@ -0,0 +1,171 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppInfoLocalizations { + + public enum AppInfoLocalizationsGetInstance { + + public static let service = APIService(id: "appInfoLocalizations-get_instance", tag: "AppInfoLocalizations", method: "GET", path: "/v1/appInfoLocalizations/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appInfoLocalizations */ + public enum FieldsappInfoLocalizations: String, Codable, Equatable, CaseIterable { + case appInfo = "appInfo" + case locale = "locale" + case name = "name" + case privacyPolicyText = "privacyPolicyText" + case privacyPolicyUrl = "privacyPolicyUrl" + case subtitle = "subtitle" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appInfo = "appInfo" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appInfoLocalizations */ + public var fieldsappInfoLocalizations: [FieldsappInfoLocalizations]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, fieldsappInfoLocalizations: [FieldsappInfoLocalizations]? = nil, include: [Include]? = nil) { + self.id = id + self.fieldsappInfoLocalizations = fieldsappInfoLocalizations + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppInfoLocalizationsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappInfoLocalizations: [FieldsappInfoLocalizations]? = nil, include: [Include]? = nil) { + let options = Options(id: id, fieldsappInfoLocalizations: fieldsappInfoLocalizations, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappInfoLocalizations = options.fieldsappInfoLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appInfoLocalizations]"] = fieldsappInfoLocalizations + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppInfoLocalizationResponse + + /** Single AppInfoLocalization */ + case status200(AppInfoLocalizationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppInfoLocalizationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppInfoLocalizationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsUpdateInstance.swift new file mode 100644 index 000000000..5de08bf0c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfoLocalizations/AppInfoLocalizationsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppInfoLocalizations { + + public enum AppInfoLocalizationsUpdateInstance { + + public static let service = APIService(id: "appInfoLocalizations-update_instance", tag: "AppInfoLocalizations", method: "PATCH", path: "/v1/appInfoLocalizations/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppInfoLocalizationUpdateRequest + + public init(body: AppInfoLocalizationUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppInfoLocalizationsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppInfoLocalizationUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppInfoLocalizationResponse + + /** Single AppInfoLocalization */ + case status200(AppInfoLocalizationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppInfoLocalizationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppInfoLocalizationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosAppInfoLocalizationsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosAppInfoLocalizationsGetToManyRelated.swift new file mode 100644 index 000000000..24628f66f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosAppInfoLocalizationsGetToManyRelated.swift @@ -0,0 +1,208 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppInfos { + + public enum AppInfosAppInfoLocalizationsGetToManyRelated { + + public static let service = APIService(id: "appInfos-appInfoLocalizations-get_to_many_related", tag: "AppInfos", method: "GET", path: "/v1/appInfos/{id}/appInfoLocalizations", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appInfos */ + public enum FieldsappInfos: String, Codable, Equatable, CaseIterable { + case app = "app" + case appInfoLocalizations = "appInfoLocalizations" + case appStoreAgeRating = "appStoreAgeRating" + case appStoreState = "appStoreState" + case brazilAgeRating = "brazilAgeRating" + case kidsAgeBand = "kidsAgeBand" + case primaryCategory = "primaryCategory" + case primarySubcategoryOne = "primarySubcategoryOne" + case primarySubcategoryTwo = "primarySubcategoryTwo" + case secondaryCategory = "secondaryCategory" + case secondarySubcategoryOne = "secondarySubcategoryOne" + case secondarySubcategoryTwo = "secondarySubcategoryTwo" + } + + /** the fields to include for returned resources of type appInfoLocalizations */ + public enum FieldsappInfoLocalizations: String, Codable, Equatable, CaseIterable { + case appInfo = "appInfo" + case locale = "locale" + case name = "name" + case privacyPolicyText = "privacyPolicyText" + case privacyPolicyUrl = "privacyPolicyUrl" + case subtitle = "subtitle" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appInfo = "appInfo" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** filter by attribute 'locale' */ + public var filterlocale: [String]? + + /** the fields to include for returned resources of type appInfos */ + public var fieldsappInfos: [FieldsappInfos]? + + /** the fields to include for returned resources of type appInfoLocalizations */ + public var fieldsappInfoLocalizations: [FieldsappInfoLocalizations]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, filterlocale: [String]? = nil, fieldsappInfos: [FieldsappInfos]? = nil, fieldsappInfoLocalizations: [FieldsappInfoLocalizations]? = nil, limit: Int? = nil, include: [Include]? = nil) { + self.id = id + self.filterlocale = filterlocale + self.fieldsappInfos = fieldsappInfos + self.fieldsappInfoLocalizations = fieldsappInfoLocalizations + self.limit = limit + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppInfosAppInfoLocalizationsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, filterlocale: [String]? = nil, fieldsappInfos: [FieldsappInfos]? = nil, fieldsappInfoLocalizations: [FieldsappInfoLocalizations]? = nil, limit: Int? = nil, include: [Include]? = nil) { + let options = Options(id: id, filterlocale: filterlocale, fieldsappInfos: fieldsappInfos, fieldsappInfoLocalizations: fieldsappInfoLocalizations, limit: limit, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterlocale = options.filterlocale?.joined(separator: ",") { + params["filter[locale]"] = filterlocale + } + if let fieldsappInfos = options.fieldsappInfos?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appInfos]"] = fieldsappInfos + } + if let fieldsappInfoLocalizations = options.fieldsappInfoLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appInfoLocalizations]"] = fieldsappInfoLocalizations + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppInfoLocalizationsResponse + + /** List of related resources */ + case status200(AppInfoLocalizationsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppInfoLocalizationsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppInfoLocalizationsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosGetInstance.swift new file mode 100644 index 000000000..cd282eadb --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosGetInstance.swift @@ -0,0 +1,222 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppInfos { + + public enum AppInfosGetInstance { + + public static let service = APIService(id: "appInfos-get_instance", tag: "AppInfos", method: "GET", path: "/v1/appInfos/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appInfos */ + public enum FieldsappInfos: String, Codable, Equatable, CaseIterable { + case app = "app" + case appInfoLocalizations = "appInfoLocalizations" + case appStoreAgeRating = "appStoreAgeRating" + case appStoreState = "appStoreState" + case brazilAgeRating = "brazilAgeRating" + case kidsAgeBand = "kidsAgeBand" + case primaryCategory = "primaryCategory" + case primarySubcategoryOne = "primarySubcategoryOne" + case primarySubcategoryTwo = "primarySubcategoryTwo" + case secondaryCategory = "secondaryCategory" + case secondarySubcategoryOne = "secondarySubcategoryOne" + case secondarySubcategoryTwo = "secondarySubcategoryTwo" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case appInfoLocalizations = "appInfoLocalizations" + case primaryCategory = "primaryCategory" + case primarySubcategoryOne = "primarySubcategoryOne" + case primarySubcategoryTwo = "primarySubcategoryTwo" + case secondaryCategory = "secondaryCategory" + case secondarySubcategoryOne = "secondarySubcategoryOne" + case secondarySubcategoryTwo = "secondarySubcategoryTwo" + } + + /** the fields to include for returned resources of type appCategories */ + public enum FieldsappCategories: String, Codable, Equatable, CaseIterable { + case parent = "parent" + case platforms = "platforms" + case subcategories = "subcategories" + } + + /** the fields to include for returned resources of type appInfoLocalizations */ + public enum FieldsappInfoLocalizations: String, Codable, Equatable, CaseIterable { + case appInfo = "appInfo" + case locale = "locale" + case name = "name" + case privacyPolicyText = "privacyPolicyText" + case privacyPolicyUrl = "privacyPolicyUrl" + case subtitle = "subtitle" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appInfos */ + public var fieldsappInfos: [FieldsappInfos]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type appCategories */ + public var fieldsappCategories: [FieldsappCategories]? + + /** the fields to include for returned resources of type appInfoLocalizations */ + public var fieldsappInfoLocalizations: [FieldsappInfoLocalizations]? + + /** maximum number of related appInfoLocalizations returned (when they are included) */ + public var limitappInfoLocalizations: Int? + + public init(id: String, fieldsappInfos: [FieldsappInfos]? = nil, include: [Include]? = nil, fieldsappCategories: [FieldsappCategories]? = nil, fieldsappInfoLocalizations: [FieldsappInfoLocalizations]? = nil, limitappInfoLocalizations: Int? = nil) { + self.id = id + self.fieldsappInfos = fieldsappInfos + self.include = include + self.fieldsappCategories = fieldsappCategories + self.fieldsappInfoLocalizations = fieldsappInfoLocalizations + self.limitappInfoLocalizations = limitappInfoLocalizations + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppInfosGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappInfos: [FieldsappInfos]? = nil, include: [Include]? = nil, fieldsappCategories: [FieldsappCategories]? = nil, fieldsappInfoLocalizations: [FieldsappInfoLocalizations]? = nil, limitappInfoLocalizations: Int? = nil) { + let options = Options(id: id, fieldsappInfos: fieldsappInfos, include: include, fieldsappCategories: fieldsappCategories, fieldsappInfoLocalizations: fieldsappInfoLocalizations, limitappInfoLocalizations: limitappInfoLocalizations) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappInfos = options.fieldsappInfos?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appInfos]"] = fieldsappInfos + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsappCategories = options.fieldsappCategories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appCategories]"] = fieldsappCategories + } + if let fieldsappInfoLocalizations = options.fieldsappInfoLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appInfoLocalizations]"] = fieldsappInfoLocalizations + } + if let limitappInfoLocalizations = options.limitappInfoLocalizations { + params["limit[appInfoLocalizations]"] = limitappInfoLocalizations + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppInfoResponse + + /** Single AppInfo */ + case status200(AppInfoResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppInfoResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppInfoResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosPrimaryCategoryGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosPrimaryCategoryGetToOneRelated.swift new file mode 100644 index 000000000..033e0297e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosPrimaryCategoryGetToOneRelated.swift @@ -0,0 +1,156 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppInfos { + + public enum AppInfosPrimaryCategoryGetToOneRelated { + + public static let service = APIService(id: "appInfos-primaryCategory-get_to_one_related", tag: "AppInfos", method: "GET", path: "/v1/appInfos/{id}/primaryCategory", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appCategories */ + public enum FieldsappCategories: String, Codable, Equatable, CaseIterable { + case parent = "parent" + case platforms = "platforms" + case subcategories = "subcategories" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appCategories */ + public var fieldsappCategories: [FieldsappCategories]? + + public init(id: String, fieldsappCategories: [FieldsappCategories]? = nil) { + self.id = id + self.fieldsappCategories = fieldsappCategories + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppInfosPrimaryCategoryGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappCategories: [FieldsappCategories]? = nil) { + let options = Options(id: id, fieldsappCategories: fieldsappCategories) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappCategories = options.fieldsappCategories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appCategories]"] = fieldsappCategories + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppCategoryResponse + + /** Related resource */ + case status200(AppCategoryResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppCategoryResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppCategoryResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosPrimarySubcategoryOneGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosPrimarySubcategoryOneGetToOneRelated.swift new file mode 100644 index 000000000..a2b4b1bae --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosPrimarySubcategoryOneGetToOneRelated.swift @@ -0,0 +1,156 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppInfos { + + public enum AppInfosPrimarySubcategoryOneGetToOneRelated { + + public static let service = APIService(id: "appInfos-primarySubcategoryOne-get_to_one_related", tag: "AppInfos", method: "GET", path: "/v1/appInfos/{id}/primarySubcategoryOne", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appCategories */ + public enum FieldsappCategories: String, Codable, Equatable, CaseIterable { + case parent = "parent" + case platforms = "platforms" + case subcategories = "subcategories" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appCategories */ + public var fieldsappCategories: [FieldsappCategories]? + + public init(id: String, fieldsappCategories: [FieldsappCategories]? = nil) { + self.id = id + self.fieldsappCategories = fieldsappCategories + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppInfosPrimarySubcategoryOneGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappCategories: [FieldsappCategories]? = nil) { + let options = Options(id: id, fieldsappCategories: fieldsappCategories) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappCategories = options.fieldsappCategories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appCategories]"] = fieldsappCategories + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppCategoryResponse + + /** Related resource */ + case status200(AppCategoryResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppCategoryResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppCategoryResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosPrimarySubcategoryTwoGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosPrimarySubcategoryTwoGetToOneRelated.swift new file mode 100644 index 000000000..a9a793834 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosPrimarySubcategoryTwoGetToOneRelated.swift @@ -0,0 +1,156 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppInfos { + + public enum AppInfosPrimarySubcategoryTwoGetToOneRelated { + + public static let service = APIService(id: "appInfos-primarySubcategoryTwo-get_to_one_related", tag: "AppInfos", method: "GET", path: "/v1/appInfos/{id}/primarySubcategoryTwo", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appCategories */ + public enum FieldsappCategories: String, Codable, Equatable, CaseIterable { + case parent = "parent" + case platforms = "platforms" + case subcategories = "subcategories" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appCategories */ + public var fieldsappCategories: [FieldsappCategories]? + + public init(id: String, fieldsappCategories: [FieldsappCategories]? = nil) { + self.id = id + self.fieldsappCategories = fieldsappCategories + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppInfosPrimarySubcategoryTwoGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappCategories: [FieldsappCategories]? = nil) { + let options = Options(id: id, fieldsappCategories: fieldsappCategories) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappCategories = options.fieldsappCategories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appCategories]"] = fieldsappCategories + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppCategoryResponse + + /** Related resource */ + case status200(AppCategoryResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppCategoryResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppCategoryResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosSecondaryCategoryGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosSecondaryCategoryGetToOneRelated.swift new file mode 100644 index 000000000..eda3d96ba --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosSecondaryCategoryGetToOneRelated.swift @@ -0,0 +1,156 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppInfos { + + public enum AppInfosSecondaryCategoryGetToOneRelated { + + public static let service = APIService(id: "appInfos-secondaryCategory-get_to_one_related", tag: "AppInfos", method: "GET", path: "/v1/appInfos/{id}/secondaryCategory", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appCategories */ + public enum FieldsappCategories: String, Codable, Equatable, CaseIterable { + case parent = "parent" + case platforms = "platforms" + case subcategories = "subcategories" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appCategories */ + public var fieldsappCategories: [FieldsappCategories]? + + public init(id: String, fieldsappCategories: [FieldsappCategories]? = nil) { + self.id = id + self.fieldsappCategories = fieldsappCategories + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppInfosSecondaryCategoryGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappCategories: [FieldsappCategories]? = nil) { + let options = Options(id: id, fieldsappCategories: fieldsappCategories) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappCategories = options.fieldsappCategories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appCategories]"] = fieldsappCategories + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppCategoryResponse + + /** Related resource */ + case status200(AppCategoryResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppCategoryResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppCategoryResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosSecondarySubcategoryOneGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosSecondarySubcategoryOneGetToOneRelated.swift new file mode 100644 index 000000000..fad52b00e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosSecondarySubcategoryOneGetToOneRelated.swift @@ -0,0 +1,156 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppInfos { + + public enum AppInfosSecondarySubcategoryOneGetToOneRelated { + + public static let service = APIService(id: "appInfos-secondarySubcategoryOne-get_to_one_related", tag: "AppInfos", method: "GET", path: "/v1/appInfos/{id}/secondarySubcategoryOne", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appCategories */ + public enum FieldsappCategories: String, Codable, Equatable, CaseIterable { + case parent = "parent" + case platforms = "platforms" + case subcategories = "subcategories" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appCategories */ + public var fieldsappCategories: [FieldsappCategories]? + + public init(id: String, fieldsappCategories: [FieldsappCategories]? = nil) { + self.id = id + self.fieldsappCategories = fieldsappCategories + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppInfosSecondarySubcategoryOneGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappCategories: [FieldsappCategories]? = nil) { + let options = Options(id: id, fieldsappCategories: fieldsappCategories) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappCategories = options.fieldsappCategories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appCategories]"] = fieldsappCategories + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppCategoryResponse + + /** Related resource */ + case status200(AppCategoryResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppCategoryResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppCategoryResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosSecondarySubcategoryTwoGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosSecondarySubcategoryTwoGetToOneRelated.swift new file mode 100644 index 000000000..9781318df --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosSecondarySubcategoryTwoGetToOneRelated.swift @@ -0,0 +1,156 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppInfos { + + public enum AppInfosSecondarySubcategoryTwoGetToOneRelated { + + public static let service = APIService(id: "appInfos-secondarySubcategoryTwo-get_to_one_related", tag: "AppInfos", method: "GET", path: "/v1/appInfos/{id}/secondarySubcategoryTwo", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appCategories */ + public enum FieldsappCategories: String, Codable, Equatable, CaseIterable { + case parent = "parent" + case platforms = "platforms" + case subcategories = "subcategories" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appCategories */ + public var fieldsappCategories: [FieldsappCategories]? + + public init(id: String, fieldsappCategories: [FieldsappCategories]? = nil) { + self.id = id + self.fieldsappCategories = fieldsappCategories + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppInfosSecondarySubcategoryTwoGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappCategories: [FieldsappCategories]? = nil) { + let options = Options(id: id, fieldsappCategories: fieldsappCategories) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappCategories = options.fieldsappCategories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appCategories]"] = fieldsappCategories + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppCategoryResponse + + /** Related resource */ + case status200(AppCategoryResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppCategoryResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppCategoryResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosUpdateInstance.swift new file mode 100644 index 000000000..550082b65 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppInfos/AppInfosUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppInfos { + + public enum AppInfosUpdateInstance { + + public static let service = APIService(id: "appInfos-update_instance", tag: "AppInfos", method: "PATCH", path: "/v1/appInfos/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppInfoUpdateRequest + + public init(body: AppInfoUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppInfosUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppInfoUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppInfoResponse + + /** Single AppInfo */ + case status200(AppInfoResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppInfoResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppInfoResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersCreateInstance.swift new file mode 100644 index 000000000..a96940351 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPreOrders { + + public enum AppPreOrdersCreateInstance { + + public static let service = APIService(id: "appPreOrders-create_instance", tag: "AppPreOrders", method: "POST", path: "/v1/appPreOrders", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: AppPreOrderCreateRequest + + public init(body: AppPreOrderCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: AppPreOrdersCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPreOrderResponse + + /** Single AppPreOrder */ + case status201(AppPreOrderResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppPreOrderResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(AppPreOrderResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersDeleteInstance.swift new file mode 100644 index 000000000..782d27805 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPreOrders { + + public enum AppPreOrdersDeleteInstance { + + public static let service = APIService(id: "appPreOrders-delete_instance", tag: "AppPreOrders", method: "DELETE", path: "/v1/appPreOrders/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPreOrdersDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersGetInstance.swift new file mode 100644 index 000000000..8936fb4d9 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersGetInstance.swift @@ -0,0 +1,168 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPreOrders { + + public enum AppPreOrdersGetInstance { + + public static let service = APIService(id: "appPreOrders-get_instance", tag: "AppPreOrders", method: "GET", path: "/v1/appPreOrders/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appPreOrders */ + public enum FieldsappPreOrders: String, Codable, Equatable, CaseIterable { + case app = "app" + case appReleaseDate = "appReleaseDate" + case preOrderAvailableDate = "preOrderAvailableDate" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appPreOrders */ + public var fieldsappPreOrders: [FieldsappPreOrders]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, fieldsappPreOrders: [FieldsappPreOrders]? = nil, include: [Include]? = nil) { + self.id = id + self.fieldsappPreOrders = fieldsappPreOrders + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPreOrdersGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappPreOrders: [FieldsappPreOrders]? = nil, include: [Include]? = nil) { + let options = Options(id: id, fieldsappPreOrders: fieldsappPreOrders, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappPreOrders = options.fieldsappPreOrders?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPreOrders]"] = fieldsappPreOrders + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPreOrderResponse + + /** Single AppPreOrder */ + case status200(AppPreOrderResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppPreOrderResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPreOrderResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersUpdateInstance.swift new file mode 100644 index 000000000..e087a0193 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreOrders/AppPreOrdersUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPreOrders { + + public enum AppPreOrdersUpdateInstance { + + public static let service = APIService(id: "appPreOrders-update_instance", tag: "AppPreOrders", method: "PATCH", path: "/v1/appPreOrders/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppPreOrderUpdateRequest + + public init(body: AppPreOrderUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppPreOrdersUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppPreOrderUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPreOrderResponse + + /** Single AppPreOrder */ + case status200(AppPreOrderResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppPreOrderResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPreOrderResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsAppPreviewsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsAppPreviewsGetToManyRelated.swift new file mode 100644 index 000000000..c8884f57c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsAppPreviewsGetToManyRelated.swift @@ -0,0 +1,197 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPreviewSets { + + public enum AppPreviewSetsAppPreviewsGetToManyRelated { + + public static let service = APIService(id: "appPreviewSets-appPreviews-get_to_many_related", tag: "AppPreviewSets", method: "GET", path: "/v1/appPreviewSets/{id}/appPreviews", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appPreviews */ + public enum FieldsappPreviews: String, Codable, Equatable, CaseIterable { + case appPreviewSet = "appPreviewSet" + case assetDeliveryState = "assetDeliveryState" + case fileName = "fileName" + case fileSize = "fileSize" + case mimeType = "mimeType" + case previewFrameTimeCode = "previewFrameTimeCode" + case previewImage = "previewImage" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + case videoUrl = "videoUrl" + } + + /** the fields to include for returned resources of type appPreviewSets */ + public enum FieldsappPreviewSets: String, Codable, Equatable, CaseIterable { + case appPreviews = "appPreviews" + case appStoreVersionLocalization = "appStoreVersionLocalization" + case previewType = "previewType" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appPreviewSet = "appPreviewSet" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appPreviews */ + public var fieldsappPreviews: [FieldsappPreviews]? + + /** the fields to include for returned resources of type appPreviewSets */ + public var fieldsappPreviewSets: [FieldsappPreviewSets]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, fieldsappPreviews: [FieldsappPreviews]? = nil, fieldsappPreviewSets: [FieldsappPreviewSets]? = nil, limit: Int? = nil, include: [Include]? = nil) { + self.id = id + self.fieldsappPreviews = fieldsappPreviews + self.fieldsappPreviewSets = fieldsappPreviewSets + self.limit = limit + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPreviewSetsAppPreviewsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappPreviews: [FieldsappPreviews]? = nil, fieldsappPreviewSets: [FieldsappPreviewSets]? = nil, limit: Int? = nil, include: [Include]? = nil) { + let options = Options(id: id, fieldsappPreviews: fieldsappPreviews, fieldsappPreviewSets: fieldsappPreviewSets, limit: limit, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappPreviews = options.fieldsappPreviews?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPreviews]"] = fieldsappPreviews + } + if let fieldsappPreviewSets = options.fieldsappPreviewSets?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPreviewSets]"] = fieldsappPreviewSets + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPreviewsResponse + + /** List of related resources */ + case status200(AppPreviewsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppPreviewsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPreviewsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsAppPreviewsGetToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsAppPreviewsGetToManyRelationship.swift new file mode 100644 index 000000000..c160765c2 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsAppPreviewsGetToManyRelationship.swift @@ -0,0 +1,149 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPreviewSets { + + public enum AppPreviewSetsAppPreviewsGetToManyRelationship { + + public static let service = APIService(id: "appPreviewSets-appPreviews-get_to_many_relationship", tag: "AppPreviewSets", method: "GET", path: "/v1/appPreviewSets/{id}/relationships/appPreviews", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, limit: Int? = nil) { + self.id = id + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPreviewSetsAppPreviewsGetToManyRelationship.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, limit: Int? = nil) { + let options = Options(id: id, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPreviewSetAppPreviewsLinkagesResponse + + /** List of related linkages */ + case status200(AppPreviewSetAppPreviewsLinkagesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppPreviewSetAppPreviewsLinkagesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPreviewSetAppPreviewsLinkagesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsAppPreviewsReplaceToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsAppPreviewsReplaceToManyRelationship.swift new file mode 100644 index 000000000..59ebb1650 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsAppPreviewsReplaceToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPreviewSets { + + public enum AppPreviewSetsAppPreviewsReplaceToManyRelationship { + + public static let service = APIService(id: "appPreviewSets-appPreviews-replace_to_many_relationship", tag: "AppPreviewSets", method: "PATCH", path: "/v1/appPreviewSets/{id}/relationships/appPreviews", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppPreviewSetAppPreviewsLinkagesRequest + + public init(body: AppPreviewSetAppPreviewsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppPreviewSetsAppPreviewsReplaceToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppPreviewSetAppPreviewsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsCreateInstance.swift new file mode 100644 index 000000000..f269e4bc4 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPreviewSets { + + public enum AppPreviewSetsCreateInstance { + + public static let service = APIService(id: "appPreviewSets-create_instance", tag: "AppPreviewSets", method: "POST", path: "/v1/appPreviewSets", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: AppPreviewSetCreateRequest + + public init(body: AppPreviewSetCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: AppPreviewSetsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPreviewSetResponse + + /** Single AppPreviewSet */ + case status201(AppPreviewSetResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppPreviewSetResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(AppPreviewSetResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsDeleteInstance.swift new file mode 100644 index 000000000..ecc3bb0c5 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPreviewSets { + + public enum AppPreviewSetsDeleteInstance { + + public static let service = APIService(id: "appPreviewSets-delete_instance", tag: "AppPreviewSets", method: "DELETE", path: "/v1/appPreviewSets/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPreviewSetsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsGetInstance.swift new file mode 100644 index 000000000..9e1f07450 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviewSets/AppPreviewSetsGetInstance.swift @@ -0,0 +1,198 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPreviewSets { + + public enum AppPreviewSetsGetInstance { + + public static let service = APIService(id: "appPreviewSets-get_instance", tag: "AppPreviewSets", method: "GET", path: "/v1/appPreviewSets/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appPreviewSets */ + public enum FieldsappPreviewSets: String, Codable, Equatable, CaseIterable { + case appPreviews = "appPreviews" + case appStoreVersionLocalization = "appStoreVersionLocalization" + case previewType = "previewType" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appPreviews = "appPreviews" + case appStoreVersionLocalization = "appStoreVersionLocalization" + } + + /** the fields to include for returned resources of type appPreviews */ + public enum FieldsappPreviews: String, Codable, Equatable, CaseIterable { + case appPreviewSet = "appPreviewSet" + case assetDeliveryState = "assetDeliveryState" + case fileName = "fileName" + case fileSize = "fileSize" + case mimeType = "mimeType" + case previewFrameTimeCode = "previewFrameTimeCode" + case previewImage = "previewImage" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + case videoUrl = "videoUrl" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appPreviewSets */ + public var fieldsappPreviewSets: [FieldsappPreviewSets]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type appPreviews */ + public var fieldsappPreviews: [FieldsappPreviews]? + + /** maximum number of related appPreviews returned (when they are included) */ + public var limitappPreviews: Int? + + public init(id: String, fieldsappPreviewSets: [FieldsappPreviewSets]? = nil, include: [Include]? = nil, fieldsappPreviews: [FieldsappPreviews]? = nil, limitappPreviews: Int? = nil) { + self.id = id + self.fieldsappPreviewSets = fieldsappPreviewSets + self.include = include + self.fieldsappPreviews = fieldsappPreviews + self.limitappPreviews = limitappPreviews + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPreviewSetsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappPreviewSets: [FieldsappPreviewSets]? = nil, include: [Include]? = nil, fieldsappPreviews: [FieldsappPreviews]? = nil, limitappPreviews: Int? = nil) { + let options = Options(id: id, fieldsappPreviewSets: fieldsappPreviewSets, include: include, fieldsappPreviews: fieldsappPreviews, limitappPreviews: limitappPreviews) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappPreviewSets = options.fieldsappPreviewSets?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPreviewSets]"] = fieldsappPreviewSets + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsappPreviews = options.fieldsappPreviews?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPreviews]"] = fieldsappPreviews + } + if let limitappPreviews = options.limitappPreviews { + params["limit[appPreviews]"] = limitappPreviews + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPreviewSetResponse + + /** Single AppPreviewSet */ + case status200(AppPreviewSetResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppPreviewSetResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPreviewSetResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsCreateInstance.swift new file mode 100644 index 000000000..851ed08ea --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPreviews { + + public enum AppPreviewsCreateInstance { + + public static let service = APIService(id: "appPreviews-create_instance", tag: "AppPreviews", method: "POST", path: "/v1/appPreviews", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: AppPreviewCreateRequest + + public init(body: AppPreviewCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: AppPreviewsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPreviewResponse + + /** Single AppPreview */ + case status201(AppPreviewResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppPreviewResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(AppPreviewResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsDeleteInstance.swift new file mode 100644 index 000000000..d4a4f961f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPreviews { + + public enum AppPreviewsDeleteInstance { + + public static let service = APIService(id: "appPreviews-delete_instance", tag: "AppPreviews", method: "DELETE", path: "/v1/appPreviews/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPreviewsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsGetInstance.swift new file mode 100644 index 000000000..b402484ca --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsGetInstance.swift @@ -0,0 +1,176 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPreviews { + + public enum AppPreviewsGetInstance { + + public static let service = APIService(id: "appPreviews-get_instance", tag: "AppPreviews", method: "GET", path: "/v1/appPreviews/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appPreviews */ + public enum FieldsappPreviews: String, Codable, Equatable, CaseIterable { + case appPreviewSet = "appPreviewSet" + case assetDeliveryState = "assetDeliveryState" + case fileName = "fileName" + case fileSize = "fileSize" + case mimeType = "mimeType" + case previewFrameTimeCode = "previewFrameTimeCode" + case previewImage = "previewImage" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + case videoUrl = "videoUrl" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appPreviewSet = "appPreviewSet" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appPreviews */ + public var fieldsappPreviews: [FieldsappPreviews]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, fieldsappPreviews: [FieldsappPreviews]? = nil, include: [Include]? = nil) { + self.id = id + self.fieldsappPreviews = fieldsappPreviews + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPreviewsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappPreviews: [FieldsappPreviews]? = nil, include: [Include]? = nil) { + let options = Options(id: id, fieldsappPreviews: fieldsappPreviews, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappPreviews = options.fieldsappPreviews?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPreviews]"] = fieldsappPreviews + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPreviewResponse + + /** Single AppPreview */ + case status200(AppPreviewResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppPreviewResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPreviewResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsUpdateInstance.swift new file mode 100644 index 000000000..4ee94c905 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPreviews/AppPreviewsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPreviews { + + public enum AppPreviewsUpdateInstance { + + public static let service = APIService(id: "appPreviews-update_instance", tag: "AppPreviews", method: "PATCH", path: "/v1/appPreviews/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppPreviewUpdateRequest + + public init(body: AppPreviewUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppPreviewsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppPreviewUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPreviewResponse + + /** Single AppPreview */ + case status200(AppPreviewResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppPreviewResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPreviewResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPricePoints/AppPricePointsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPricePoints/AppPricePointsGetCollection.swift new file mode 100644 index 000000000..5f60464c0 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPricePoints/AppPricePointsGetCollection.swift @@ -0,0 +1,187 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPricePoints { + + public enum AppPricePointsGetCollection { + + public static let service = APIService(id: "appPricePoints-get_collection", tag: "AppPricePoints", method: "GET", path: "/v1/appPricePoints", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appPricePoints */ + public enum FieldsappPricePoints: String, Codable, Equatable, CaseIterable { + case customerPrice = "customerPrice" + case priceTier = "priceTier" + case proceeds = "proceeds" + case territory = "territory" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case priceTier = "priceTier" + case territory = "territory" + } + + /** the fields to include for returned resources of type territories */ + public enum Fieldsterritories: String, Codable, Equatable, CaseIterable { + case currency = "currency" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by id(s) of related 'priceTier' */ + public var filterpriceTier: [String]? + + /** filter by id(s) of related 'territory' */ + public var filterterritory: [String]? + + /** the fields to include for returned resources of type appPricePoints */ + public var fieldsappPricePoints: [FieldsappPricePoints]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type territories */ + public var fieldsterritories: [Fieldsterritories]? + + public init(filterpriceTier: [String]? = nil, filterterritory: [String]? = nil, fieldsappPricePoints: [FieldsappPricePoints]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsterritories: [Fieldsterritories]? = nil) { + self.filterpriceTier = filterpriceTier + self.filterterritory = filterterritory + self.fieldsappPricePoints = fieldsappPricePoints + self.limit = limit + self.include = include + self.fieldsterritories = fieldsterritories + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPricePointsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterpriceTier: [String]? = nil, filterterritory: [String]? = nil, fieldsappPricePoints: [FieldsappPricePoints]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsterritories: [Fieldsterritories]? = nil) { + let options = Options(filterpriceTier: filterpriceTier, filterterritory: filterterritory, fieldsappPricePoints: fieldsappPricePoints, limit: limit, include: include, fieldsterritories: fieldsterritories) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterpriceTier = options.filterpriceTier?.joined(separator: ",") { + params["filter[priceTier]"] = filterpriceTier + } + if let filterterritory = options.filterterritory?.joined(separator: ",") { + params["filter[territory]"] = filterterritory + } + if let fieldsappPricePoints = options.fieldsappPricePoints?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPricePoints]"] = fieldsappPricePoints + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsterritories = options.fieldsterritories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[territories]"] = fieldsterritories + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPricePointsResponse + + /** List of AppPricePoints */ + case status200(AppPricePointsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: AppPricePointsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPricePointsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPricePoints/AppPricePointsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPricePoints/AppPricePointsGetInstance.swift new file mode 100644 index 000000000..c32ba3266 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPricePoints/AppPricePointsGetInstance.swift @@ -0,0 +1,182 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPricePoints { + + public enum AppPricePointsGetInstance { + + public static let service = APIService(id: "appPricePoints-get_instance", tag: "AppPricePoints", method: "GET", path: "/v1/appPricePoints/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appPricePoints */ + public enum FieldsappPricePoints: String, Codable, Equatable, CaseIterable { + case customerPrice = "customerPrice" + case priceTier = "priceTier" + case proceeds = "proceeds" + case territory = "territory" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case priceTier = "priceTier" + case territory = "territory" + } + + /** the fields to include for returned resources of type territories */ + public enum Fieldsterritories: String, Codable, Equatable, CaseIterable { + case currency = "currency" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appPricePoints */ + public var fieldsappPricePoints: [FieldsappPricePoints]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type territories */ + public var fieldsterritories: [Fieldsterritories]? + + public init(id: String, fieldsappPricePoints: [FieldsappPricePoints]? = nil, include: [Include]? = nil, fieldsterritories: [Fieldsterritories]? = nil) { + self.id = id + self.fieldsappPricePoints = fieldsappPricePoints + self.include = include + self.fieldsterritories = fieldsterritories + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPricePointsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappPricePoints: [FieldsappPricePoints]? = nil, include: [Include]? = nil, fieldsterritories: [Fieldsterritories]? = nil) { + let options = Options(id: id, fieldsappPricePoints: fieldsappPricePoints, include: include, fieldsterritories: fieldsterritories) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappPricePoints = options.fieldsappPricePoints?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPricePoints]"] = fieldsappPricePoints + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsterritories = options.fieldsterritories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[territories]"] = fieldsterritories + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPricePointResponse + + /** Single AppPricePoint */ + case status200(AppPricePointResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppPricePointResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPricePointResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPricePoints/AppPricePointsTerritoryGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPricePoints/AppPricePointsTerritoryGetToOneRelated.swift new file mode 100644 index 000000000..8a069c2c7 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPricePoints/AppPricePointsTerritoryGetToOneRelated.swift @@ -0,0 +1,154 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPricePoints { + + public enum AppPricePointsTerritoryGetToOneRelated { + + public static let service = APIService(id: "appPricePoints-territory-get_to_one_related", tag: "AppPricePoints", method: "GET", path: "/v1/appPricePoints/{id}/territory", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type territories */ + public enum Fieldsterritories: String, Codable, Equatable, CaseIterable { + case currency = "currency" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type territories */ + public var fieldsterritories: [Fieldsterritories]? + + public init(id: String, fieldsterritories: [Fieldsterritories]? = nil) { + self.id = id + self.fieldsterritories = fieldsterritories + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPricePointsTerritoryGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsterritories: [Fieldsterritories]? = nil) { + let options = Options(id: id, fieldsterritories: fieldsterritories) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsterritories = options.fieldsterritories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[territories]"] = fieldsterritories + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = TerritoryResponse + + /** Related resource */ + case status200(TerritoryResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: TerritoryResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(TerritoryResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPriceTiers/AppPriceTiersGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPriceTiers/AppPriceTiersGetCollection.swift new file mode 100644 index 000000000..e27546835 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPriceTiers/AppPriceTiersGetCollection.swift @@ -0,0 +1,186 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPriceTiers { + + public enum AppPriceTiersGetCollection { + + public static let service = APIService(id: "appPriceTiers-get_collection", tag: "AppPriceTiers", method: "GET", path: "/v1/appPriceTiers", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appPriceTiers */ + public enum FieldsappPriceTiers: String, Codable, Equatable, CaseIterable { + case pricePoints = "pricePoints" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case pricePoints = "pricePoints" + } + + /** the fields to include for returned resources of type appPricePoints */ + public enum FieldsappPricePoints: String, Codable, Equatable, CaseIterable { + case customerPrice = "customerPrice" + case priceTier = "priceTier" + case proceeds = "proceeds" + case territory = "territory" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by id(s) */ + public var filterid: [String]? + + /** the fields to include for returned resources of type appPriceTiers */ + public var fieldsappPriceTiers: [FieldsappPriceTiers]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type appPricePoints */ + public var fieldsappPricePoints: [FieldsappPricePoints]? + + /** maximum number of related pricePoints returned (when they are included) */ + public var limitpricePoints: Int? + + public init(filterid: [String]? = nil, fieldsappPriceTiers: [FieldsappPriceTiers]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsappPricePoints: [FieldsappPricePoints]? = nil, limitpricePoints: Int? = nil) { + self.filterid = filterid + self.fieldsappPriceTiers = fieldsappPriceTiers + self.limit = limit + self.include = include + self.fieldsappPricePoints = fieldsappPricePoints + self.limitpricePoints = limitpricePoints + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPriceTiersGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterid: [String]? = nil, fieldsappPriceTiers: [FieldsappPriceTiers]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsappPricePoints: [FieldsappPricePoints]? = nil, limitpricePoints: Int? = nil) { + let options = Options(filterid: filterid, fieldsappPriceTiers: fieldsappPriceTiers, limit: limit, include: include, fieldsappPricePoints: fieldsappPricePoints, limitpricePoints: limitpricePoints) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterid = options.filterid?.joined(separator: ",") { + params["filter[id]"] = filterid + } + if let fieldsappPriceTiers = options.fieldsappPriceTiers?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPriceTiers]"] = fieldsappPriceTiers + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsappPricePoints = options.fieldsappPricePoints?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPricePoints]"] = fieldsappPricePoints + } + if let limitpricePoints = options.limitpricePoints { + params["limit[pricePoints]"] = limitpricePoints + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPriceTiersResponse + + /** List of AppPriceTiers */ + case status200(AppPriceTiersResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: AppPriceTiersResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPriceTiersResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPriceTiers/AppPriceTiersGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPriceTiers/AppPriceTiersGetInstance.swift new file mode 100644 index 000000000..0bc71dc8f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPriceTiers/AppPriceTiersGetInstance.swift @@ -0,0 +1,188 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPriceTiers { + + public enum AppPriceTiersGetInstance { + + public static let service = APIService(id: "appPriceTiers-get_instance", tag: "AppPriceTiers", method: "GET", path: "/v1/appPriceTiers/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appPriceTiers */ + public enum FieldsappPriceTiers: String, Codable, Equatable, CaseIterable { + case pricePoints = "pricePoints" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case pricePoints = "pricePoints" + } + + /** the fields to include for returned resources of type appPricePoints */ + public enum FieldsappPricePoints: String, Codable, Equatable, CaseIterable { + case customerPrice = "customerPrice" + case priceTier = "priceTier" + case proceeds = "proceeds" + case territory = "territory" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appPriceTiers */ + public var fieldsappPriceTiers: [FieldsappPriceTiers]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type appPricePoints */ + public var fieldsappPricePoints: [FieldsappPricePoints]? + + /** maximum number of related pricePoints returned (when they are included) */ + public var limitpricePoints: Int? + + public init(id: String, fieldsappPriceTiers: [FieldsappPriceTiers]? = nil, include: [Include]? = nil, fieldsappPricePoints: [FieldsappPricePoints]? = nil, limitpricePoints: Int? = nil) { + self.id = id + self.fieldsappPriceTiers = fieldsappPriceTiers + self.include = include + self.fieldsappPricePoints = fieldsappPricePoints + self.limitpricePoints = limitpricePoints + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPriceTiersGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappPriceTiers: [FieldsappPriceTiers]? = nil, include: [Include]? = nil, fieldsappPricePoints: [FieldsappPricePoints]? = nil, limitpricePoints: Int? = nil) { + let options = Options(id: id, fieldsappPriceTiers: fieldsappPriceTiers, include: include, fieldsappPricePoints: fieldsappPricePoints, limitpricePoints: limitpricePoints) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappPriceTiers = options.fieldsappPriceTiers?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPriceTiers]"] = fieldsappPriceTiers + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsappPricePoints = options.fieldsappPricePoints?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPricePoints]"] = fieldsappPricePoints + } + if let limitpricePoints = options.limitpricePoints { + params["limit[pricePoints]"] = limitpricePoints + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPriceTierResponse + + /** Single AppPriceTier */ + case status200(AppPriceTierResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppPriceTierResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPriceTierResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPriceTiers/AppPriceTiersPricePointsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPriceTiers/AppPriceTiersPricePointsGetToManyRelated.swift new file mode 100644 index 000000000..36756efc8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPriceTiers/AppPriceTiersPricePointsGetToManyRelated.swift @@ -0,0 +1,164 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPriceTiers { + + public enum AppPriceTiersPricePointsGetToManyRelated { + + public static let service = APIService(id: "appPriceTiers-pricePoints-get_to_many_related", tag: "AppPriceTiers", method: "GET", path: "/v1/appPriceTiers/{id}/pricePoints", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appPricePoints */ + public enum FieldsappPricePoints: String, Codable, Equatable, CaseIterable { + case customerPrice = "customerPrice" + case priceTier = "priceTier" + case proceeds = "proceeds" + case territory = "territory" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appPricePoints */ + public var fieldsappPricePoints: [FieldsappPricePoints]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsappPricePoints: [FieldsappPricePoints]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsappPricePoints = fieldsappPricePoints + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPriceTiersPricePointsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappPricePoints: [FieldsappPricePoints]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsappPricePoints: fieldsappPricePoints, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappPricePoints = options.fieldsappPricePoints?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPricePoints]"] = fieldsappPricePoints + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPricePointsResponse + + /** List of related resources */ + case status200(AppPricePointsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppPricePointsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPricePointsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPrices/AppPricesGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPrices/AppPricesGetInstance.swift new file mode 100644 index 000000000..6404037e8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppPrices/AppPricesGetInstance.swift @@ -0,0 +1,168 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppPrices { + + public enum AppPricesGetInstance { + + public static let service = APIService(id: "appPrices-get_instance", tag: "AppPrices", method: "GET", path: "/v1/appPrices/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appPrices */ + public enum FieldsappPrices: String, Codable, Equatable, CaseIterable { + case app = "app" + case priceTier = "priceTier" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case priceTier = "priceTier" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appPrices */ + public var fieldsappPrices: [FieldsappPrices]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, fieldsappPrices: [FieldsappPrices]? = nil, include: [Include]? = nil) { + self.id = id + self.fieldsappPrices = fieldsappPrices + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppPricesGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappPrices: [FieldsappPrices]? = nil, include: [Include]? = nil) { + let options = Options(id: id, fieldsappPrices: fieldsappPrices, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappPrices = options.fieldsappPrices?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPrices]"] = fieldsappPrices + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPriceResponse + + /** Single AppPrice */ + case status200(AppPriceResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppPriceResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPriceResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsAppScreenshotsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsAppScreenshotsGetToManyRelated.swift new file mode 100644 index 000000000..3a0fd1bc9 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsAppScreenshotsGetToManyRelated.swift @@ -0,0 +1,196 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppScreenshotSets { + + public enum AppScreenshotSetsAppScreenshotsGetToManyRelated { + + public static let service = APIService(id: "appScreenshotSets-appScreenshots-get_to_many_related", tag: "AppScreenshotSets", method: "GET", path: "/v1/appScreenshotSets/{id}/appScreenshots", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appScreenshotSets */ + public enum FieldsappScreenshotSets: String, Codable, Equatable, CaseIterable { + case appScreenshots = "appScreenshots" + case appStoreVersionLocalization = "appStoreVersionLocalization" + case screenshotDisplayType = "screenshotDisplayType" + } + + /** the fields to include for returned resources of type appScreenshots */ + public enum FieldsappScreenshots: String, Codable, Equatable, CaseIterable { + case appScreenshotSet = "appScreenshotSet" + case assetDeliveryState = "assetDeliveryState" + case assetToken = "assetToken" + case assetType = "assetType" + case fileName = "fileName" + case fileSize = "fileSize" + case imageAsset = "imageAsset" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appScreenshotSet = "appScreenshotSet" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appScreenshotSets */ + public var fieldsappScreenshotSets: [FieldsappScreenshotSets]? + + /** the fields to include for returned resources of type appScreenshots */ + public var fieldsappScreenshots: [FieldsappScreenshots]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, fieldsappScreenshotSets: [FieldsappScreenshotSets]? = nil, fieldsappScreenshots: [FieldsappScreenshots]? = nil, limit: Int? = nil, include: [Include]? = nil) { + self.id = id + self.fieldsappScreenshotSets = fieldsappScreenshotSets + self.fieldsappScreenshots = fieldsappScreenshots + self.limit = limit + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppScreenshotSetsAppScreenshotsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappScreenshotSets: [FieldsappScreenshotSets]? = nil, fieldsappScreenshots: [FieldsappScreenshots]? = nil, limit: Int? = nil, include: [Include]? = nil) { + let options = Options(id: id, fieldsappScreenshotSets: fieldsappScreenshotSets, fieldsappScreenshots: fieldsappScreenshots, limit: limit, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappScreenshotSets = options.fieldsappScreenshotSets?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appScreenshotSets]"] = fieldsappScreenshotSets + } + if let fieldsappScreenshots = options.fieldsappScreenshots?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appScreenshots]"] = fieldsappScreenshots + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppScreenshotsResponse + + /** List of related resources */ + case status200(AppScreenshotsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppScreenshotsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppScreenshotsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsAppScreenshotsGetToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsAppScreenshotsGetToManyRelationship.swift new file mode 100644 index 000000000..5e6075766 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsAppScreenshotsGetToManyRelationship.swift @@ -0,0 +1,149 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppScreenshotSets { + + public enum AppScreenshotSetsAppScreenshotsGetToManyRelationship { + + public static let service = APIService(id: "appScreenshotSets-appScreenshots-get_to_many_relationship", tag: "AppScreenshotSets", method: "GET", path: "/v1/appScreenshotSets/{id}/relationships/appScreenshots", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, limit: Int? = nil) { + self.id = id + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppScreenshotSetsAppScreenshotsGetToManyRelationship.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, limit: Int? = nil) { + let options = Options(id: id, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppScreenshotSetAppScreenshotsLinkagesResponse + + /** List of related linkages */ + case status200(AppScreenshotSetAppScreenshotsLinkagesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppScreenshotSetAppScreenshotsLinkagesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppScreenshotSetAppScreenshotsLinkagesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsAppScreenshotsReplaceToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsAppScreenshotsReplaceToManyRelationship.swift new file mode 100644 index 000000000..583c5149e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsAppScreenshotsReplaceToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppScreenshotSets { + + public enum AppScreenshotSetsAppScreenshotsReplaceToManyRelationship { + + public static let service = APIService(id: "appScreenshotSets-appScreenshots-replace_to_many_relationship", tag: "AppScreenshotSets", method: "PATCH", path: "/v1/appScreenshotSets/{id}/relationships/appScreenshots", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppScreenshotSetAppScreenshotsLinkagesRequest + + public init(body: AppScreenshotSetAppScreenshotsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppScreenshotSetsAppScreenshotsReplaceToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppScreenshotSetAppScreenshotsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsCreateInstance.swift new file mode 100644 index 000000000..7f3a25366 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppScreenshotSets { + + public enum AppScreenshotSetsCreateInstance { + + public static let service = APIService(id: "appScreenshotSets-create_instance", tag: "AppScreenshotSets", method: "POST", path: "/v1/appScreenshotSets", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: AppScreenshotSetCreateRequest + + public init(body: AppScreenshotSetCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: AppScreenshotSetsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppScreenshotSetResponse + + /** Single AppScreenshotSet */ + case status201(AppScreenshotSetResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppScreenshotSetResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(AppScreenshotSetResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsDeleteInstance.swift new file mode 100644 index 000000000..cc7f85177 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppScreenshotSets { + + public enum AppScreenshotSetsDeleteInstance { + + public static let service = APIService(id: "appScreenshotSets-delete_instance", tag: "AppScreenshotSets", method: "DELETE", path: "/v1/appScreenshotSets/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppScreenshotSetsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsGetInstance.swift new file mode 100644 index 000000000..67a67fb78 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshotSets/AppScreenshotSetsGetInstance.swift @@ -0,0 +1,197 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppScreenshotSets { + + public enum AppScreenshotSetsGetInstance { + + public static let service = APIService(id: "appScreenshotSets-get_instance", tag: "AppScreenshotSets", method: "GET", path: "/v1/appScreenshotSets/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appScreenshotSets */ + public enum FieldsappScreenshotSets: String, Codable, Equatable, CaseIterable { + case appScreenshots = "appScreenshots" + case appStoreVersionLocalization = "appStoreVersionLocalization" + case screenshotDisplayType = "screenshotDisplayType" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appScreenshots = "appScreenshots" + case appStoreVersionLocalization = "appStoreVersionLocalization" + } + + /** the fields to include for returned resources of type appScreenshots */ + public enum FieldsappScreenshots: String, Codable, Equatable, CaseIterable { + case appScreenshotSet = "appScreenshotSet" + case assetDeliveryState = "assetDeliveryState" + case assetToken = "assetToken" + case assetType = "assetType" + case fileName = "fileName" + case fileSize = "fileSize" + case imageAsset = "imageAsset" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appScreenshotSets */ + public var fieldsappScreenshotSets: [FieldsappScreenshotSets]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type appScreenshots */ + public var fieldsappScreenshots: [FieldsappScreenshots]? + + /** maximum number of related appScreenshots returned (when they are included) */ + public var limitappScreenshots: Int? + + public init(id: String, fieldsappScreenshotSets: [FieldsappScreenshotSets]? = nil, include: [Include]? = nil, fieldsappScreenshots: [FieldsappScreenshots]? = nil, limitappScreenshots: Int? = nil) { + self.id = id + self.fieldsappScreenshotSets = fieldsappScreenshotSets + self.include = include + self.fieldsappScreenshots = fieldsappScreenshots + self.limitappScreenshots = limitappScreenshots + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppScreenshotSetsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappScreenshotSets: [FieldsappScreenshotSets]? = nil, include: [Include]? = nil, fieldsappScreenshots: [FieldsappScreenshots]? = nil, limitappScreenshots: Int? = nil) { + let options = Options(id: id, fieldsappScreenshotSets: fieldsappScreenshotSets, include: include, fieldsappScreenshots: fieldsappScreenshots, limitappScreenshots: limitappScreenshots) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappScreenshotSets = options.fieldsappScreenshotSets?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appScreenshotSets]"] = fieldsappScreenshotSets + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsappScreenshots = options.fieldsappScreenshots?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appScreenshots]"] = fieldsappScreenshots + } + if let limitappScreenshots = options.limitappScreenshots { + params["limit[appScreenshots]"] = limitappScreenshots + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppScreenshotSetResponse + + /** Single AppScreenshotSet */ + case status200(AppScreenshotSetResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppScreenshotSetResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppScreenshotSetResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsCreateInstance.swift new file mode 100644 index 000000000..7e9928ae0 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppScreenshots { + + public enum AppScreenshotsCreateInstance { + + public static let service = APIService(id: "appScreenshots-create_instance", tag: "AppScreenshots", method: "POST", path: "/v1/appScreenshots", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: AppScreenshotCreateRequest + + public init(body: AppScreenshotCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: AppScreenshotsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppScreenshotResponse + + /** Single AppScreenshot */ + case status201(AppScreenshotResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppScreenshotResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(AppScreenshotResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsDeleteInstance.swift new file mode 100644 index 000000000..62f68f808 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppScreenshots { + + public enum AppScreenshotsDeleteInstance { + + public static let service = APIService(id: "appScreenshots-delete_instance", tag: "AppScreenshots", method: "DELETE", path: "/v1/appScreenshots/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppScreenshotsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsGetInstance.swift new file mode 100644 index 000000000..9a7a437fb --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsGetInstance.swift @@ -0,0 +1,175 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppScreenshots { + + public enum AppScreenshotsGetInstance { + + public static let service = APIService(id: "appScreenshots-get_instance", tag: "AppScreenshots", method: "GET", path: "/v1/appScreenshots/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appScreenshots */ + public enum FieldsappScreenshots: String, Codable, Equatable, CaseIterable { + case appScreenshotSet = "appScreenshotSet" + case assetDeliveryState = "assetDeliveryState" + case assetToken = "assetToken" + case assetType = "assetType" + case fileName = "fileName" + case fileSize = "fileSize" + case imageAsset = "imageAsset" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appScreenshotSet = "appScreenshotSet" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appScreenshots */ + public var fieldsappScreenshots: [FieldsappScreenshots]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, fieldsappScreenshots: [FieldsappScreenshots]? = nil, include: [Include]? = nil) { + self.id = id + self.fieldsappScreenshots = fieldsappScreenshots + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppScreenshotsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappScreenshots: [FieldsappScreenshots]? = nil, include: [Include]? = nil) { + let options = Options(id: id, fieldsappScreenshots: fieldsappScreenshots, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappScreenshots = options.fieldsappScreenshots?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appScreenshots]"] = fieldsappScreenshots + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppScreenshotResponse + + /** Single AppScreenshot */ + case status200(AppScreenshotResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppScreenshotResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppScreenshotResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsUpdateInstance.swift new file mode 100644 index 000000000..ec63e3877 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppScreenshots/AppScreenshotsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppScreenshots { + + public enum AppScreenshotsUpdateInstance { + + public static let service = APIService(id: "appScreenshots-update_instance", tag: "AppScreenshots", method: "PATCH", path: "/v1/appScreenshots/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppScreenshotUpdateRequest + + public init(body: AppScreenshotUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppScreenshotsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppScreenshotUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppScreenshotResponse + + /** Single AppScreenshot */ + case status200(AppScreenshotResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppScreenshotResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppScreenshotResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsCreateInstance.swift new file mode 100644 index 000000000..2a1f43e29 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreReviewAttachments { + + public enum AppStoreReviewAttachmentsCreateInstance { + + public static let service = APIService(id: "appStoreReviewAttachments-create_instance", tag: "AppStoreReviewAttachments", method: "POST", path: "/v1/appStoreReviewAttachments", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: AppStoreReviewAttachmentCreateRequest + + public init(body: AppStoreReviewAttachmentCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: AppStoreReviewAttachmentsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreReviewAttachmentResponse + + /** Single AppStoreReviewAttachment */ + case status201(AppStoreReviewAttachmentResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppStoreReviewAttachmentResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(AppStoreReviewAttachmentResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsDeleteInstance.swift new file mode 100644 index 000000000..4d3d20688 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreReviewAttachments { + + public enum AppStoreReviewAttachmentsDeleteInstance { + + public static let service = APIService(id: "appStoreReviewAttachments-delete_instance", tag: "AppStoreReviewAttachments", method: "DELETE", path: "/v1/appStoreReviewAttachments/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreReviewAttachmentsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsGetInstance.swift new file mode 100644 index 000000000..8b49fc4a9 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsGetInstance.swift @@ -0,0 +1,172 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreReviewAttachments { + + public enum AppStoreReviewAttachmentsGetInstance { + + public static let service = APIService(id: "appStoreReviewAttachments-get_instance", tag: "AppStoreReviewAttachments", method: "GET", path: "/v1/appStoreReviewAttachments/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appStoreReviewAttachments */ + public enum FieldsappStoreReviewAttachments: String, Codable, Equatable, CaseIterable { + case appStoreReviewDetail = "appStoreReviewDetail" + case assetDeliveryState = "assetDeliveryState" + case fileName = "fileName" + case fileSize = "fileSize" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appStoreReviewDetail = "appStoreReviewDetail" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appStoreReviewAttachments */ + public var fieldsappStoreReviewAttachments: [FieldsappStoreReviewAttachments]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, fieldsappStoreReviewAttachments: [FieldsappStoreReviewAttachments]? = nil, include: [Include]? = nil) { + self.id = id + self.fieldsappStoreReviewAttachments = fieldsappStoreReviewAttachments + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreReviewAttachmentsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappStoreReviewAttachments: [FieldsappStoreReviewAttachments]? = nil, include: [Include]? = nil) { + let options = Options(id: id, fieldsappStoreReviewAttachments: fieldsappStoreReviewAttachments, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappStoreReviewAttachments = options.fieldsappStoreReviewAttachments?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreReviewAttachments]"] = fieldsappStoreReviewAttachments + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreReviewAttachmentResponse + + /** Single AppStoreReviewAttachment */ + case status200(AppStoreReviewAttachmentResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppStoreReviewAttachmentResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreReviewAttachmentResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsUpdateInstance.swift new file mode 100644 index 000000000..b45ad3e01 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewAttachments/AppStoreReviewAttachmentsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreReviewAttachments { + + public enum AppStoreReviewAttachmentsUpdateInstance { + + public static let service = APIService(id: "appStoreReviewAttachments-update_instance", tag: "AppStoreReviewAttachments", method: "PATCH", path: "/v1/appStoreReviewAttachments/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppStoreReviewAttachmentUpdateRequest + + public init(body: AppStoreReviewAttachmentUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppStoreReviewAttachmentsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppStoreReviewAttachmentUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreReviewAttachmentResponse + + /** Single AppStoreReviewAttachment */ + case status200(AppStoreReviewAttachmentResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppStoreReviewAttachmentResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreReviewAttachmentResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsAppStoreReviewAttachmentsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsAppStoreReviewAttachmentsGetToManyRelated.swift new file mode 100644 index 000000000..dab929939 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsAppStoreReviewAttachmentsGetToManyRelated.swift @@ -0,0 +1,200 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreReviewDetails { + + public enum AppStoreReviewDetailsAppStoreReviewAttachmentsGetToManyRelated { + + public static let service = APIService(id: "appStoreReviewDetails-appStoreReviewAttachments-get_to_many_related", tag: "AppStoreReviewDetails", method: "GET", path: "/v1/appStoreReviewDetails/{id}/appStoreReviewAttachments", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appStoreReviewDetails */ + public enum FieldsappStoreReviewDetails: String, Codable, Equatable, CaseIterable { + case appStoreReviewAttachments = "appStoreReviewAttachments" + case appStoreVersion = "appStoreVersion" + case contactEmail = "contactEmail" + case contactFirstName = "contactFirstName" + case contactLastName = "contactLastName" + case contactPhone = "contactPhone" + case demoAccountName = "demoAccountName" + case demoAccountPassword = "demoAccountPassword" + case demoAccountRequired = "demoAccountRequired" + case notes = "notes" + } + + /** the fields to include for returned resources of type appStoreReviewAttachments */ + public enum FieldsappStoreReviewAttachments: String, Codable, Equatable, CaseIterable { + case appStoreReviewDetail = "appStoreReviewDetail" + case assetDeliveryState = "assetDeliveryState" + case fileName = "fileName" + case fileSize = "fileSize" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appStoreReviewDetail = "appStoreReviewDetail" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appStoreReviewDetails */ + public var fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? + + /** the fields to include for returned resources of type appStoreReviewAttachments */ + public var fieldsappStoreReviewAttachments: [FieldsappStoreReviewAttachments]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? = nil, fieldsappStoreReviewAttachments: [FieldsappStoreReviewAttachments]? = nil, limit: Int? = nil, include: [Include]? = nil) { + self.id = id + self.fieldsappStoreReviewDetails = fieldsappStoreReviewDetails + self.fieldsappStoreReviewAttachments = fieldsappStoreReviewAttachments + self.limit = limit + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreReviewDetailsAppStoreReviewAttachmentsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? = nil, fieldsappStoreReviewAttachments: [FieldsappStoreReviewAttachments]? = nil, limit: Int? = nil, include: [Include]? = nil) { + let options = Options(id: id, fieldsappStoreReviewDetails: fieldsappStoreReviewDetails, fieldsappStoreReviewAttachments: fieldsappStoreReviewAttachments, limit: limit, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappStoreReviewDetails = options.fieldsappStoreReviewDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreReviewDetails]"] = fieldsappStoreReviewDetails + } + if let fieldsappStoreReviewAttachments = options.fieldsappStoreReviewAttachments?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreReviewAttachments]"] = fieldsappStoreReviewAttachments + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreReviewAttachmentsResponse + + /** List of related resources */ + case status200(AppStoreReviewAttachmentsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppStoreReviewAttachmentsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreReviewAttachmentsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsCreateInstance.swift new file mode 100644 index 000000000..1b9df9a1a --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreReviewDetails { + + public enum AppStoreReviewDetailsCreateInstance { + + public static let service = APIService(id: "appStoreReviewDetails-create_instance", tag: "AppStoreReviewDetails", method: "POST", path: "/v1/appStoreReviewDetails", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: AppStoreReviewDetailCreateRequest + + public init(body: AppStoreReviewDetailCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: AppStoreReviewDetailsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreReviewDetailResponse + + /** Single AppStoreReviewDetail */ + case status201(AppStoreReviewDetailResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppStoreReviewDetailResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(AppStoreReviewDetailResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsGetInstance.swift new file mode 100644 index 000000000..20c401555 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsGetInstance.swift @@ -0,0 +1,201 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreReviewDetails { + + public enum AppStoreReviewDetailsGetInstance { + + public static let service = APIService(id: "appStoreReviewDetails-get_instance", tag: "AppStoreReviewDetails", method: "GET", path: "/v1/appStoreReviewDetails/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appStoreReviewDetails */ + public enum FieldsappStoreReviewDetails: String, Codable, Equatable, CaseIterable { + case appStoreReviewAttachments = "appStoreReviewAttachments" + case appStoreVersion = "appStoreVersion" + case contactEmail = "contactEmail" + case contactFirstName = "contactFirstName" + case contactLastName = "contactLastName" + case contactPhone = "contactPhone" + case demoAccountName = "demoAccountName" + case demoAccountPassword = "demoAccountPassword" + case demoAccountRequired = "demoAccountRequired" + case notes = "notes" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appStoreReviewAttachments = "appStoreReviewAttachments" + case appStoreVersion = "appStoreVersion" + } + + /** the fields to include for returned resources of type appStoreReviewAttachments */ + public enum FieldsappStoreReviewAttachments: String, Codable, Equatable, CaseIterable { + case appStoreReviewDetail = "appStoreReviewDetail" + case assetDeliveryState = "assetDeliveryState" + case fileName = "fileName" + case fileSize = "fileSize" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appStoreReviewDetails */ + public var fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type appStoreReviewAttachments */ + public var fieldsappStoreReviewAttachments: [FieldsappStoreReviewAttachments]? + + /** maximum number of related appStoreReviewAttachments returned (when they are included) */ + public var limitappStoreReviewAttachments: Int? + + public init(id: String, fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? = nil, include: [Include]? = nil, fieldsappStoreReviewAttachments: [FieldsappStoreReviewAttachments]? = nil, limitappStoreReviewAttachments: Int? = nil) { + self.id = id + self.fieldsappStoreReviewDetails = fieldsappStoreReviewDetails + self.include = include + self.fieldsappStoreReviewAttachments = fieldsappStoreReviewAttachments + self.limitappStoreReviewAttachments = limitappStoreReviewAttachments + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreReviewDetailsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? = nil, include: [Include]? = nil, fieldsappStoreReviewAttachments: [FieldsappStoreReviewAttachments]? = nil, limitappStoreReviewAttachments: Int? = nil) { + let options = Options(id: id, fieldsappStoreReviewDetails: fieldsappStoreReviewDetails, include: include, fieldsappStoreReviewAttachments: fieldsappStoreReviewAttachments, limitappStoreReviewAttachments: limitappStoreReviewAttachments) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappStoreReviewDetails = options.fieldsappStoreReviewDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreReviewDetails]"] = fieldsappStoreReviewDetails + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsappStoreReviewAttachments = options.fieldsappStoreReviewAttachments?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreReviewAttachments]"] = fieldsappStoreReviewAttachments + } + if let limitappStoreReviewAttachments = options.limitappStoreReviewAttachments { + params["limit[appStoreReviewAttachments]"] = limitappStoreReviewAttachments + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreReviewDetailResponse + + /** Single AppStoreReviewDetail */ + case status200(AppStoreReviewDetailResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppStoreReviewDetailResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreReviewDetailResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsUpdateInstance.swift new file mode 100644 index 000000000..dc62970c0 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreReviewDetails/AppStoreReviewDetailsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreReviewDetails { + + public enum AppStoreReviewDetailsUpdateInstance { + + public static let service = APIService(id: "appStoreReviewDetails-update_instance", tag: "AppStoreReviewDetails", method: "PATCH", path: "/v1/appStoreReviewDetails/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppStoreReviewDetailUpdateRequest + + public init(body: AppStoreReviewDetailUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppStoreReviewDetailsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppStoreReviewDetailUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreReviewDetailResponse + + /** Single AppStoreReviewDetail */ + case status200(AppStoreReviewDetailResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppStoreReviewDetailResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreReviewDetailResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsAppPreviewSetsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsAppPreviewSetsGetToManyRelated.swift new file mode 100644 index 000000000..45ddaf2e1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsAppPreviewSetsGetToManyRelated.swift @@ -0,0 +1,245 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersionLocalizations { + + public enum AppStoreVersionLocalizationsAppPreviewSetsGetToManyRelated { + + public static let service = APIService(id: "appStoreVersionLocalizations-appPreviewSets-get_to_many_related", tag: "AppStoreVersionLocalizations", method: "GET", path: "/v1/appStoreVersionLocalizations/{id}/appPreviewSets", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'previewType' */ + public enum FilterpreviewType: String, Codable, Equatable, CaseIterable { + case iphone65 = "IPHONE_65" + case iphone58 = "IPHONE_58" + case iphone55 = "IPHONE_55" + case iphone47 = "IPHONE_47" + case iphone40 = "IPHONE_40" + case iphone35 = "IPHONE_35" + case ipadPro3gen129 = "IPAD_PRO_3GEN_129" + case ipadPro3gen11 = "IPAD_PRO_3GEN_11" + case ipadPro129 = "IPAD_PRO_129" + case ipad105 = "IPAD_105" + case ipad97 = "IPAD_97" + case desktop = "DESKTOP" + case watchSeries4 = "WATCH_SERIES_4" + case watchSeries3 = "WATCH_SERIES_3" + case appleTv = "APPLE_TV" + } + + /** the fields to include for returned resources of type appStoreVersionLocalizations */ + public enum FieldsappStoreVersionLocalizations: String, Codable, Equatable, CaseIterable { + case appPreviewSets = "appPreviewSets" + case appScreenshotSets = "appScreenshotSets" + case appStoreVersion = "appStoreVersion" + case description = "description" + case keywords = "keywords" + case locale = "locale" + case marketingUrl = "marketingUrl" + case promotionalText = "promotionalText" + case supportUrl = "supportUrl" + case whatsNew = "whatsNew" + } + + /** the fields to include for returned resources of type appPreviews */ + public enum FieldsappPreviews: String, Codable, Equatable, CaseIterable { + case appPreviewSet = "appPreviewSet" + case assetDeliveryState = "assetDeliveryState" + case fileName = "fileName" + case fileSize = "fileSize" + case mimeType = "mimeType" + case previewFrameTimeCode = "previewFrameTimeCode" + case previewImage = "previewImage" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + case videoUrl = "videoUrl" + } + + /** the fields to include for returned resources of type appPreviewSets */ + public enum FieldsappPreviewSets: String, Codable, Equatable, CaseIterable { + case appPreviews = "appPreviews" + case appStoreVersionLocalization = "appStoreVersionLocalization" + case previewType = "previewType" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appPreviews = "appPreviews" + case appStoreVersionLocalization = "appStoreVersionLocalization" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** filter by attribute 'previewType' */ + public var filterpreviewType: [FilterpreviewType]? + + /** the fields to include for returned resources of type appStoreVersionLocalizations */ + public var fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? + + /** the fields to include for returned resources of type appPreviews */ + public var fieldsappPreviews: [FieldsappPreviews]? + + /** the fields to include for returned resources of type appPreviewSets */ + public var fieldsappPreviewSets: [FieldsappPreviewSets]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, filterpreviewType: [FilterpreviewType]? = nil, fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? = nil, fieldsappPreviews: [FieldsappPreviews]? = nil, fieldsappPreviewSets: [FieldsappPreviewSets]? = nil, limit: Int? = nil, include: [Include]? = nil) { + self.id = id + self.filterpreviewType = filterpreviewType + self.fieldsappStoreVersionLocalizations = fieldsappStoreVersionLocalizations + self.fieldsappPreviews = fieldsappPreviews + self.fieldsappPreviewSets = fieldsappPreviewSets + self.limit = limit + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionLocalizationsAppPreviewSetsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, filterpreviewType: [FilterpreviewType]? = nil, fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? = nil, fieldsappPreviews: [FieldsappPreviews]? = nil, fieldsappPreviewSets: [FieldsappPreviewSets]? = nil, limit: Int? = nil, include: [Include]? = nil) { + let options = Options(id: id, filterpreviewType: filterpreviewType, fieldsappStoreVersionLocalizations: fieldsappStoreVersionLocalizations, fieldsappPreviews: fieldsappPreviews, fieldsappPreviewSets: fieldsappPreviewSets, limit: limit, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterpreviewType = options.filterpreviewType?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[previewType]"] = filterpreviewType + } + if let fieldsappStoreVersionLocalizations = options.fieldsappStoreVersionLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersionLocalizations]"] = fieldsappStoreVersionLocalizations + } + if let fieldsappPreviews = options.fieldsappPreviews?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPreviews]"] = fieldsappPreviews + } + if let fieldsappPreviewSets = options.fieldsappPreviewSets?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPreviewSets]"] = fieldsappPreviewSets + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPreviewSetsResponse + + /** List of related resources */ + case status200(AppPreviewSetsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppPreviewSetsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPreviewSetsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsAppScreenshotSetsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsAppScreenshotSetsGetToManyRelated.swift new file mode 100644 index 000000000..71edd4d4c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsAppScreenshotSetsGetToManyRelated.swift @@ -0,0 +1,254 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersionLocalizations { + + public enum AppStoreVersionLocalizationsAppScreenshotSetsGetToManyRelated { + + public static let service = APIService(id: "appStoreVersionLocalizations-appScreenshotSets-get_to_many_related", tag: "AppStoreVersionLocalizations", method: "GET", path: "/v1/appStoreVersionLocalizations/{id}/appScreenshotSets", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'screenshotDisplayType' */ + public enum FilterscreenshotDisplayType: String, Codable, Equatable, CaseIterable { + case appIphone65 = "APP_IPHONE_65" + case appIphone58 = "APP_IPHONE_58" + case appIphone55 = "APP_IPHONE_55" + case appIphone47 = "APP_IPHONE_47" + case appIphone40 = "APP_IPHONE_40" + case appIphone35 = "APP_IPHONE_35" + case appIpadPro3gen129 = "APP_IPAD_PRO_3GEN_129" + case appIpadPro3gen11 = "APP_IPAD_PRO_3GEN_11" + case appIpadPro129 = "APP_IPAD_PRO_129" + case appIpad105 = "APP_IPAD_105" + case appIpad97 = "APP_IPAD_97" + case appDesktop = "APP_DESKTOP" + case appWatchSeries4 = "APP_WATCH_SERIES_4" + case appWatchSeries3 = "APP_WATCH_SERIES_3" + case appAppleTv = "APP_APPLE_TV" + case imessageAppIphone65 = "IMESSAGE_APP_IPHONE_65" + case imessageAppIphone58 = "IMESSAGE_APP_IPHONE_58" + case imessageAppIphone55 = "IMESSAGE_APP_IPHONE_55" + case imessageAppIphone47 = "IMESSAGE_APP_IPHONE_47" + case imessageAppIphone40 = "IMESSAGE_APP_IPHONE_40" + case imessageAppIpadPro3gen129 = "IMESSAGE_APP_IPAD_PRO_3GEN_129" + case imessageAppIpadPro3gen11 = "IMESSAGE_APP_IPAD_PRO_3GEN_11" + case imessageAppIpadPro129 = "IMESSAGE_APP_IPAD_PRO_129" + case imessageAppIpad105 = "IMESSAGE_APP_IPAD_105" + case imessageAppIpad97 = "IMESSAGE_APP_IPAD_97" + } + + /** the fields to include for returned resources of type appStoreVersionLocalizations */ + public enum FieldsappStoreVersionLocalizations: String, Codable, Equatable, CaseIterable { + case appPreviewSets = "appPreviewSets" + case appScreenshotSets = "appScreenshotSets" + case appStoreVersion = "appStoreVersion" + case description = "description" + case keywords = "keywords" + case locale = "locale" + case marketingUrl = "marketingUrl" + case promotionalText = "promotionalText" + case supportUrl = "supportUrl" + case whatsNew = "whatsNew" + } + + /** the fields to include for returned resources of type appScreenshotSets */ + public enum FieldsappScreenshotSets: String, Codable, Equatable, CaseIterable { + case appScreenshots = "appScreenshots" + case appStoreVersionLocalization = "appStoreVersionLocalization" + case screenshotDisplayType = "screenshotDisplayType" + } + + /** the fields to include for returned resources of type appScreenshots */ + public enum FieldsappScreenshots: String, Codable, Equatable, CaseIterable { + case appScreenshotSet = "appScreenshotSet" + case assetDeliveryState = "assetDeliveryState" + case assetToken = "assetToken" + case assetType = "assetType" + case fileName = "fileName" + case fileSize = "fileSize" + case imageAsset = "imageAsset" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appScreenshots = "appScreenshots" + case appStoreVersionLocalization = "appStoreVersionLocalization" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** filter by attribute 'screenshotDisplayType' */ + public var filterscreenshotDisplayType: [FilterscreenshotDisplayType]? + + /** the fields to include for returned resources of type appStoreVersionLocalizations */ + public var fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? + + /** the fields to include for returned resources of type appScreenshotSets */ + public var fieldsappScreenshotSets: [FieldsappScreenshotSets]? + + /** the fields to include for returned resources of type appScreenshots */ + public var fieldsappScreenshots: [FieldsappScreenshots]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, filterscreenshotDisplayType: [FilterscreenshotDisplayType]? = nil, fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? = nil, fieldsappScreenshotSets: [FieldsappScreenshotSets]? = nil, fieldsappScreenshots: [FieldsappScreenshots]? = nil, limit: Int? = nil, include: [Include]? = nil) { + self.id = id + self.filterscreenshotDisplayType = filterscreenshotDisplayType + self.fieldsappStoreVersionLocalizations = fieldsappStoreVersionLocalizations + self.fieldsappScreenshotSets = fieldsappScreenshotSets + self.fieldsappScreenshots = fieldsappScreenshots + self.limit = limit + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionLocalizationsAppScreenshotSetsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, filterscreenshotDisplayType: [FilterscreenshotDisplayType]? = nil, fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? = nil, fieldsappScreenshotSets: [FieldsappScreenshotSets]? = nil, fieldsappScreenshots: [FieldsappScreenshots]? = nil, limit: Int? = nil, include: [Include]? = nil) { + let options = Options(id: id, filterscreenshotDisplayType: filterscreenshotDisplayType, fieldsappStoreVersionLocalizations: fieldsappStoreVersionLocalizations, fieldsappScreenshotSets: fieldsappScreenshotSets, fieldsappScreenshots: fieldsappScreenshots, limit: limit, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterscreenshotDisplayType = options.filterscreenshotDisplayType?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[screenshotDisplayType]"] = filterscreenshotDisplayType + } + if let fieldsappStoreVersionLocalizations = options.fieldsappStoreVersionLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersionLocalizations]"] = fieldsappStoreVersionLocalizations + } + if let fieldsappScreenshotSets = options.fieldsappScreenshotSets?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appScreenshotSets]"] = fieldsappScreenshotSets + } + if let fieldsappScreenshots = options.fieldsappScreenshots?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appScreenshots]"] = fieldsappScreenshots + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppScreenshotSetsResponse + + /** List of related resources */ + case status200(AppScreenshotSetsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppScreenshotSetsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppScreenshotSetsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsCreateInstance.swift new file mode 100644 index 000000000..0e03f4ab9 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersionLocalizations { + + public enum AppStoreVersionLocalizationsCreateInstance { + + public static let service = APIService(id: "appStoreVersionLocalizations-create_instance", tag: "AppStoreVersionLocalizations", method: "POST", path: "/v1/appStoreVersionLocalizations", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: AppStoreVersionLocalizationCreateRequest + + public init(body: AppStoreVersionLocalizationCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: AppStoreVersionLocalizationsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionLocalizationResponse + + /** Single AppStoreVersionLocalization */ + case status201(AppStoreVersionLocalizationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppStoreVersionLocalizationResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(AppStoreVersionLocalizationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsDeleteInstance.swift new file mode 100644 index 000000000..e80eb1b5b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersionLocalizations { + + public enum AppStoreVersionLocalizationsDeleteInstance { + + public static let service = APIService(id: "appStoreVersionLocalizations-delete_instance", tag: "AppStoreVersionLocalizations", method: "DELETE", path: "/v1/appStoreVersionLocalizations/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionLocalizationsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsGetInstance.swift new file mode 100644 index 000000000..d8c7e619d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsGetInstance.swift @@ -0,0 +1,219 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersionLocalizations { + + public enum AppStoreVersionLocalizationsGetInstance { + + public static let service = APIService(id: "appStoreVersionLocalizations-get_instance", tag: "AppStoreVersionLocalizations", method: "GET", path: "/v1/appStoreVersionLocalizations/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appStoreVersionLocalizations */ + public enum FieldsappStoreVersionLocalizations: String, Codable, Equatable, CaseIterable { + case appPreviewSets = "appPreviewSets" + case appScreenshotSets = "appScreenshotSets" + case appStoreVersion = "appStoreVersion" + case description = "description" + case keywords = "keywords" + case locale = "locale" + case marketingUrl = "marketingUrl" + case promotionalText = "promotionalText" + case supportUrl = "supportUrl" + case whatsNew = "whatsNew" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appPreviewSets = "appPreviewSets" + case appScreenshotSets = "appScreenshotSets" + case appStoreVersion = "appStoreVersion" + } + + /** the fields to include for returned resources of type appScreenshotSets */ + public enum FieldsappScreenshotSets: String, Codable, Equatable, CaseIterable { + case appScreenshots = "appScreenshots" + case appStoreVersionLocalization = "appStoreVersionLocalization" + case screenshotDisplayType = "screenshotDisplayType" + } + + /** the fields to include for returned resources of type appPreviewSets */ + public enum FieldsappPreviewSets: String, Codable, Equatable, CaseIterable { + case appPreviews = "appPreviews" + case appStoreVersionLocalization = "appStoreVersionLocalization" + case previewType = "previewType" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appStoreVersionLocalizations */ + public var fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type appScreenshotSets */ + public var fieldsappScreenshotSets: [FieldsappScreenshotSets]? + + /** the fields to include for returned resources of type appPreviewSets */ + public var fieldsappPreviewSets: [FieldsappPreviewSets]? + + /** maximum number of related appPreviewSets returned (when they are included) */ + public var limitappPreviewSets: Int? + + /** maximum number of related appScreenshotSets returned (when they are included) */ + public var limitappScreenshotSets: Int? + + public init(id: String, fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? = nil, include: [Include]? = nil, fieldsappScreenshotSets: [FieldsappScreenshotSets]? = nil, fieldsappPreviewSets: [FieldsappPreviewSets]? = nil, limitappPreviewSets: Int? = nil, limitappScreenshotSets: Int? = nil) { + self.id = id + self.fieldsappStoreVersionLocalizations = fieldsappStoreVersionLocalizations + self.include = include + self.fieldsappScreenshotSets = fieldsappScreenshotSets + self.fieldsappPreviewSets = fieldsappPreviewSets + self.limitappPreviewSets = limitappPreviewSets + self.limitappScreenshotSets = limitappScreenshotSets + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionLocalizationsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? = nil, include: [Include]? = nil, fieldsappScreenshotSets: [FieldsappScreenshotSets]? = nil, fieldsappPreviewSets: [FieldsappPreviewSets]? = nil, limitappPreviewSets: Int? = nil, limitappScreenshotSets: Int? = nil) { + let options = Options(id: id, fieldsappStoreVersionLocalizations: fieldsappStoreVersionLocalizations, include: include, fieldsappScreenshotSets: fieldsappScreenshotSets, fieldsappPreviewSets: fieldsappPreviewSets, limitappPreviewSets: limitappPreviewSets, limitappScreenshotSets: limitappScreenshotSets) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappStoreVersionLocalizations = options.fieldsappStoreVersionLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersionLocalizations]"] = fieldsappStoreVersionLocalizations + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsappScreenshotSets = options.fieldsappScreenshotSets?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appScreenshotSets]"] = fieldsappScreenshotSets + } + if let fieldsappPreviewSets = options.fieldsappPreviewSets?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPreviewSets]"] = fieldsappPreviewSets + } + if let limitappPreviewSets = options.limitappPreviewSets { + params["limit[appPreviewSets]"] = limitappPreviewSets + } + if let limitappScreenshotSets = options.limitappScreenshotSets { + params["limit[appScreenshotSets]"] = limitappScreenshotSets + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionLocalizationResponse + + /** Single AppStoreVersionLocalization */ + case status200(AppStoreVersionLocalizationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppStoreVersionLocalizationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreVersionLocalizationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsUpdateInstance.swift new file mode 100644 index 000000000..e127e31f5 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionLocalizations/AppStoreVersionLocalizationsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersionLocalizations { + + public enum AppStoreVersionLocalizationsUpdateInstance { + + public static let service = APIService(id: "appStoreVersionLocalizations-update_instance", tag: "AppStoreVersionLocalizations", method: "PATCH", path: "/v1/appStoreVersionLocalizations/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppStoreVersionLocalizationUpdateRequest + + public init(body: AppStoreVersionLocalizationUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppStoreVersionLocalizationsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppStoreVersionLocalizationUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionLocalizationResponse + + /** Single AppStoreVersionLocalization */ + case status200(AppStoreVersionLocalizationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppStoreVersionLocalizationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreVersionLocalizationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleasesCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleasesCreateInstance.swift new file mode 100644 index 000000000..0c19e2117 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleasesCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersionPhasedReleases { + + public enum AppStoreVersionPhasedReleasesCreateInstance { + + public static let service = APIService(id: "appStoreVersionPhasedReleases-create_instance", tag: "AppStoreVersionPhasedReleases", method: "POST", path: "/v1/appStoreVersionPhasedReleases", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: AppStoreVersionPhasedReleaseCreateRequest + + public init(body: AppStoreVersionPhasedReleaseCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: AppStoreVersionPhasedReleasesCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionPhasedReleaseResponse + + /** Single AppStoreVersionPhasedRelease */ + case status201(AppStoreVersionPhasedReleaseResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppStoreVersionPhasedReleaseResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(AppStoreVersionPhasedReleaseResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleasesDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleasesDeleteInstance.swift new file mode 100644 index 000000000..3e367ca00 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleasesDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersionPhasedReleases { + + public enum AppStoreVersionPhasedReleasesDeleteInstance { + + public static let service = APIService(id: "appStoreVersionPhasedReleases-delete_instance", tag: "AppStoreVersionPhasedReleases", method: "DELETE", path: "/v1/appStoreVersionPhasedReleases/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionPhasedReleasesDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleasesUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleasesUpdateInstance.swift new file mode 100644 index 000000000..704c05021 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionPhasedReleases/AppStoreVersionPhasedReleasesUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersionPhasedReleases { + + public enum AppStoreVersionPhasedReleasesUpdateInstance { + + public static let service = APIService(id: "appStoreVersionPhasedReleases-update_instance", tag: "AppStoreVersionPhasedReleases", method: "PATCH", path: "/v1/appStoreVersionPhasedReleases/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppStoreVersionPhasedReleaseUpdateRequest + + public init(body: AppStoreVersionPhasedReleaseUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppStoreVersionPhasedReleasesUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppStoreVersionPhasedReleaseUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionPhasedReleaseResponse + + /** Single AppStoreVersionPhasedRelease */ + case status200(AppStoreVersionPhasedReleaseResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppStoreVersionPhasedReleaseResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreVersionPhasedReleaseResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionSubmissions/AppStoreVersionSubmissionsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionSubmissions/AppStoreVersionSubmissionsCreateInstance.swift new file mode 100644 index 000000000..7def8f16e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionSubmissions/AppStoreVersionSubmissionsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersionSubmissions { + + public enum AppStoreVersionSubmissionsCreateInstance { + + public static let service = APIService(id: "appStoreVersionSubmissions-create_instance", tag: "AppStoreVersionSubmissions", method: "POST", path: "/v1/appStoreVersionSubmissions", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: AppStoreVersionSubmissionCreateRequest + + public init(body: AppStoreVersionSubmissionCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: AppStoreVersionSubmissionsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionSubmissionResponse + + /** Single AppStoreVersionSubmission */ + case status201(AppStoreVersionSubmissionResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppStoreVersionSubmissionResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(AppStoreVersionSubmissionResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionSubmissions/AppStoreVersionSubmissionsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionSubmissions/AppStoreVersionSubmissionsDeleteInstance.swift new file mode 100644 index 000000000..5eade2580 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersionSubmissions/AppStoreVersionSubmissionsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersionSubmissions { + + public enum AppStoreVersionSubmissionsDeleteInstance { + + public static let service = APIService(id: "appStoreVersionSubmissions-delete_instance", tag: "AppStoreVersionSubmissions", method: "DELETE", path: "/v1/appStoreVersionSubmissions/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionSubmissionsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAgeRatingDeclarationGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAgeRatingDeclarationGetToOneRelated.swift new file mode 100644 index 000000000..1d69247be --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAgeRatingDeclarationGetToOneRelated.swift @@ -0,0 +1,167 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersions { + + public enum AppStoreVersionsAgeRatingDeclarationGetToOneRelated { + + public static let service = APIService(id: "appStoreVersions-ageRatingDeclaration-get_to_one_related", tag: "AppStoreVersions", method: "GET", path: "/v1/appStoreVersions/{id}/ageRatingDeclaration", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type ageRatingDeclarations */ + public enum FieldsageRatingDeclarations: String, Codable, Equatable, CaseIterable { + case alcoholTobaccoOrDrugUseOrReferences = "alcoholTobaccoOrDrugUseOrReferences" + case gamblingAndContests = "gamblingAndContests" + case gamblingSimulated = "gamblingSimulated" + case horrorOrFearThemes = "horrorOrFearThemes" + case kidsAgeBand = "kidsAgeBand" + case matureOrSuggestiveThemes = "matureOrSuggestiveThemes" + case medicalOrTreatmentInformation = "medicalOrTreatmentInformation" + case profanityOrCrudeHumor = "profanityOrCrudeHumor" + case sexualContentGraphicAndNudity = "sexualContentGraphicAndNudity" + case sexualContentOrNudity = "sexualContentOrNudity" + case unrestrictedWebAccess = "unrestrictedWebAccess" + case violenceCartoonOrFantasy = "violenceCartoonOrFantasy" + case violenceRealistic = "violenceRealistic" + case violenceRealisticProlongedGraphicOrSadistic = "violenceRealisticProlongedGraphicOrSadistic" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type ageRatingDeclarations */ + public var fieldsageRatingDeclarations: [FieldsageRatingDeclarations]? + + public init(id: String, fieldsageRatingDeclarations: [FieldsageRatingDeclarations]? = nil) { + self.id = id + self.fieldsageRatingDeclarations = fieldsageRatingDeclarations + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionsAgeRatingDeclarationGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsageRatingDeclarations: [FieldsageRatingDeclarations]? = nil) { + let options = Options(id: id, fieldsageRatingDeclarations: fieldsageRatingDeclarations) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsageRatingDeclarations = options.fieldsageRatingDeclarations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[ageRatingDeclarations]"] = fieldsageRatingDeclarations + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AgeRatingDeclarationResponse + + /** Related resource */ + case status200(AgeRatingDeclarationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AgeRatingDeclarationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AgeRatingDeclarationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreReviewDetailGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreReviewDetailGetToOneRelated.swift new file mode 100644 index 000000000..6689797af --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreReviewDetailGetToOneRelated.swift @@ -0,0 +1,223 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersions { + + public enum AppStoreVersionsAppStoreReviewDetailGetToOneRelated { + + public static let service = APIService(id: "appStoreVersions-appStoreReviewDetail-get_to_one_related", tag: "AppStoreVersions", method: "GET", path: "/v1/appStoreVersions/{id}/appStoreReviewDetail", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appStoreReviewDetails */ + public enum FieldsappStoreReviewDetails: String, Codable, Equatable, CaseIterable { + case appStoreReviewAttachments = "appStoreReviewAttachments" + case appStoreVersion = "appStoreVersion" + case contactEmail = "contactEmail" + case contactFirstName = "contactFirstName" + case contactLastName = "contactLastName" + case contactPhone = "contactPhone" + case demoAccountName = "demoAccountName" + case demoAccountPassword = "demoAccountPassword" + case demoAccountRequired = "demoAccountRequired" + case notes = "notes" + } + + /** the fields to include for returned resources of type appStoreVersions */ + public enum FieldsappStoreVersions: String, Codable, Equatable, CaseIterable { + case ageRatingDeclaration = "ageRatingDeclaration" + case app = "app" + case appStoreReviewDetail = "appStoreReviewDetail" + case appStoreState = "appStoreState" + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + case appStoreVersionPhasedRelease = "appStoreVersionPhasedRelease" + case appStoreVersionSubmission = "appStoreVersionSubmission" + case build = "build" + case copyright = "copyright" + case createdDate = "createdDate" + case downloadable = "downloadable" + case earliestReleaseDate = "earliestReleaseDate" + case idfaDeclaration = "idfaDeclaration" + case platform = "platform" + case releaseType = "releaseType" + case routingAppCoverage = "routingAppCoverage" + case usesIdfa = "usesIdfa" + case versionString = "versionString" + } + + /** the fields to include for returned resources of type appStoreReviewAttachments */ + public enum FieldsappStoreReviewAttachments: String, Codable, Equatable, CaseIterable { + case appStoreReviewDetail = "appStoreReviewDetail" + case assetDeliveryState = "assetDeliveryState" + case fileName = "fileName" + case fileSize = "fileSize" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appStoreReviewAttachments = "appStoreReviewAttachments" + case appStoreVersion = "appStoreVersion" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appStoreReviewDetails */ + public var fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? + + /** the fields to include for returned resources of type appStoreVersions */ + public var fieldsappStoreVersions: [FieldsappStoreVersions]? + + /** the fields to include for returned resources of type appStoreReviewAttachments */ + public var fieldsappStoreReviewAttachments: [FieldsappStoreReviewAttachments]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? = nil, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, fieldsappStoreReviewAttachments: [FieldsappStoreReviewAttachments]? = nil, include: [Include]? = nil) { + self.id = id + self.fieldsappStoreReviewDetails = fieldsappStoreReviewDetails + self.fieldsappStoreVersions = fieldsappStoreVersions + self.fieldsappStoreReviewAttachments = fieldsappStoreReviewAttachments + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionsAppStoreReviewDetailGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? = nil, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, fieldsappStoreReviewAttachments: [FieldsappStoreReviewAttachments]? = nil, include: [Include]? = nil) { + let options = Options(id: id, fieldsappStoreReviewDetails: fieldsappStoreReviewDetails, fieldsappStoreVersions: fieldsappStoreVersions, fieldsappStoreReviewAttachments: fieldsappStoreReviewAttachments, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappStoreReviewDetails = options.fieldsappStoreReviewDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreReviewDetails]"] = fieldsappStoreReviewDetails + } + if let fieldsappStoreVersions = options.fieldsappStoreVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersions]"] = fieldsappStoreVersions + } + if let fieldsappStoreReviewAttachments = options.fieldsappStoreReviewAttachments?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreReviewAttachments]"] = fieldsappStoreReviewAttachments + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreReviewDetailResponse + + /** Related resource */ + case status200(AppStoreReviewDetailResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppStoreReviewDetailResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreReviewDetailResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreVersionLocalizationsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreVersionLocalizationsGetToManyRelated.swift new file mode 100644 index 000000000..9020680d9 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreVersionLocalizationsGetToManyRelated.swift @@ -0,0 +1,170 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersions { + + public enum AppStoreVersionsAppStoreVersionLocalizationsGetToManyRelated { + + public static let service = APIService(id: "appStoreVersions-appStoreVersionLocalizations-get_to_many_related", tag: "AppStoreVersions", method: "GET", path: "/v1/appStoreVersions/{id}/appStoreVersionLocalizations", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appStoreVersionLocalizations */ + public enum FieldsappStoreVersionLocalizations: String, Codable, Equatable, CaseIterable { + case appPreviewSets = "appPreviewSets" + case appScreenshotSets = "appScreenshotSets" + case appStoreVersion = "appStoreVersion" + case description = "description" + case keywords = "keywords" + case locale = "locale" + case marketingUrl = "marketingUrl" + case promotionalText = "promotionalText" + case supportUrl = "supportUrl" + case whatsNew = "whatsNew" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appStoreVersionLocalizations */ + public var fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsappStoreVersionLocalizations = fieldsappStoreVersionLocalizations + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionsAppStoreVersionLocalizationsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsappStoreVersionLocalizations: fieldsappStoreVersionLocalizations, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappStoreVersionLocalizations = options.fieldsappStoreVersionLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersionLocalizations]"] = fieldsappStoreVersionLocalizations + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionLocalizationsResponse + + /** List of related resources */ + case status200(AppStoreVersionLocalizationsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppStoreVersionLocalizationsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreVersionLocalizationsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreVersionPhasedReleaseGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreVersionPhasedReleaseGetToOneRelated.swift new file mode 100644 index 000000000..945c39b4e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreVersionPhasedReleaseGetToOneRelated.swift @@ -0,0 +1,158 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersions { + + public enum AppStoreVersionsAppStoreVersionPhasedReleaseGetToOneRelated { + + public static let service = APIService(id: "appStoreVersions-appStoreVersionPhasedRelease-get_to_one_related", tag: "AppStoreVersions", method: "GET", path: "/v1/appStoreVersions/{id}/appStoreVersionPhasedRelease", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appStoreVersionPhasedReleases */ + public enum FieldsappStoreVersionPhasedReleases: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + case currentDayNumber = "currentDayNumber" + case phasedReleaseState = "phasedReleaseState" + case startDate = "startDate" + case totalPauseDuration = "totalPauseDuration" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appStoreVersionPhasedReleases */ + public var fieldsappStoreVersionPhasedReleases: [FieldsappStoreVersionPhasedReleases]? + + public init(id: String, fieldsappStoreVersionPhasedReleases: [FieldsappStoreVersionPhasedReleases]? = nil) { + self.id = id + self.fieldsappStoreVersionPhasedReleases = fieldsappStoreVersionPhasedReleases + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionsAppStoreVersionPhasedReleaseGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappStoreVersionPhasedReleases: [FieldsappStoreVersionPhasedReleases]? = nil) { + let options = Options(id: id, fieldsappStoreVersionPhasedReleases: fieldsappStoreVersionPhasedReleases) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappStoreVersionPhasedReleases = options.fieldsappStoreVersionPhasedReleases?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersionPhasedReleases]"] = fieldsappStoreVersionPhasedReleases + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionPhasedReleaseResponse + + /** Related resource */ + case status200(AppStoreVersionPhasedReleaseResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppStoreVersionPhasedReleaseResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreVersionPhasedReleaseResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreVersionSubmissionGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreVersionSubmissionGetToOneRelated.swift new file mode 100644 index 000000000..721acda62 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsAppStoreVersionSubmissionGetToOneRelated.swift @@ -0,0 +1,195 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersions { + + public enum AppStoreVersionsAppStoreVersionSubmissionGetToOneRelated { + + public static let service = APIService(id: "appStoreVersions-appStoreVersionSubmission-get_to_one_related", tag: "AppStoreVersions", method: "GET", path: "/v1/appStoreVersions/{id}/appStoreVersionSubmission", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appStoreVersions */ + public enum FieldsappStoreVersions: String, Codable, Equatable, CaseIterable { + case ageRatingDeclaration = "ageRatingDeclaration" + case app = "app" + case appStoreReviewDetail = "appStoreReviewDetail" + case appStoreState = "appStoreState" + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + case appStoreVersionPhasedRelease = "appStoreVersionPhasedRelease" + case appStoreVersionSubmission = "appStoreVersionSubmission" + case build = "build" + case copyright = "copyright" + case createdDate = "createdDate" + case downloadable = "downloadable" + case earliestReleaseDate = "earliestReleaseDate" + case idfaDeclaration = "idfaDeclaration" + case platform = "platform" + case releaseType = "releaseType" + case routingAppCoverage = "routingAppCoverage" + case usesIdfa = "usesIdfa" + case versionString = "versionString" + } + + /** the fields to include for returned resources of type appStoreVersionSubmissions */ + public enum FieldsappStoreVersionSubmissions: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appStoreVersions */ + public var fieldsappStoreVersions: [FieldsappStoreVersions]? + + /** the fields to include for returned resources of type appStoreVersionSubmissions */ + public var fieldsappStoreVersionSubmissions: [FieldsappStoreVersionSubmissions]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, fieldsappStoreVersionSubmissions: [FieldsappStoreVersionSubmissions]? = nil, include: [Include]? = nil) { + self.id = id + self.fieldsappStoreVersions = fieldsappStoreVersions + self.fieldsappStoreVersionSubmissions = fieldsappStoreVersionSubmissions + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionsAppStoreVersionSubmissionGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, fieldsappStoreVersionSubmissions: [FieldsappStoreVersionSubmissions]? = nil, include: [Include]? = nil) { + let options = Options(id: id, fieldsappStoreVersions: fieldsappStoreVersions, fieldsappStoreVersionSubmissions: fieldsappStoreVersionSubmissions, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappStoreVersions = options.fieldsappStoreVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersions]"] = fieldsappStoreVersions + } + if let fieldsappStoreVersionSubmissions = options.fieldsappStoreVersionSubmissions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersionSubmissions]"] = fieldsappStoreVersionSubmissions + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionSubmissionResponse + + /** Related resource */ + case status200(AppStoreVersionSubmissionResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppStoreVersionSubmissionResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreVersionSubmissionResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsBuildGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsBuildGetToOneRelated.swift new file mode 100644 index 000000000..a4a28b01d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsBuildGetToOneRelated.swift @@ -0,0 +1,173 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersions { + + public enum AppStoreVersionsBuildGetToOneRelated { + + public static let service = APIService(id: "appStoreVersions-build-get_to_one_related", tag: "AppStoreVersions", method: "GET", path: "/v1/appStoreVersions/{id}/build", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + public init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil) { + self.id = id + self.fieldsbuilds = fieldsbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionsBuildGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil) { + let options = Options(id: id, fieldsbuilds: fieldsbuilds) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildResponse + + /** Related resource */ + case status200(BuildResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BuildResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsBuildGetToOneRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsBuildGetToOneRelationship.swift new file mode 100644 index 000000000..7e30e8b35 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsBuildGetToOneRelationship.swift @@ -0,0 +1,137 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersions { + + public enum AppStoreVersionsBuildGetToOneRelationship { + + public static let service = APIService(id: "appStoreVersions-build-get_to_one_relationship", tag: "AppStoreVersions", method: "GET", path: "/v1/appStoreVersions/{id}/relationships/build", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionsBuildGetToOneRelationship.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionBuildLinkageResponse + + /** Related linkage */ + case status200(AppStoreVersionBuildLinkageResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppStoreVersionBuildLinkageResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreVersionBuildLinkageResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsBuildUpdateToOneRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsBuildUpdateToOneRelationship.swift new file mode 100644 index 000000000..ad26ca614 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsBuildUpdateToOneRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersions { + + public enum AppStoreVersionsBuildUpdateToOneRelationship { + + public static let service = APIService(id: "appStoreVersions-build-update_to_one_relationship", tag: "AppStoreVersions", method: "PATCH", path: "/v1/appStoreVersions/{id}/relationships/build", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppStoreVersionBuildLinkageRequest + + public init(body: AppStoreVersionBuildLinkageRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppStoreVersionsBuildUpdateToOneRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppStoreVersionBuildLinkageRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsCreateInstance.swift new file mode 100644 index 000000000..c81193016 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersions { + + public enum AppStoreVersionsCreateInstance { + + public static let service = APIService(id: "appStoreVersions-create_instance", tag: "AppStoreVersions", method: "POST", path: "/v1/appStoreVersions", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: AppStoreVersionCreateRequest + + public init(body: AppStoreVersionCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: AppStoreVersionsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionResponse + + /** Single AppStoreVersion */ + case status201(AppStoreVersionResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppStoreVersionResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(AppStoreVersionResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsDeleteInstance.swift new file mode 100644 index 000000000..e4c32b1cd --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersions { + + public enum AppStoreVersionsDeleteInstance { + + public static let service = APIService(id: "appStoreVersions-delete_instance", tag: "AppStoreVersions", method: "DELETE", path: "/v1/appStoreVersions/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsGetInstance.swift new file mode 100644 index 000000000..7296f0403 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsGetInstance.swift @@ -0,0 +1,358 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersions { + + public enum AppStoreVersionsGetInstance { + + public static let service = APIService(id: "appStoreVersions-get_instance", tag: "AppStoreVersions", method: "GET", path: "/v1/appStoreVersions/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appStoreVersions */ + public enum FieldsappStoreVersions: String, Codable, Equatable, CaseIterable { + case ageRatingDeclaration = "ageRatingDeclaration" + case app = "app" + case appStoreReviewDetail = "appStoreReviewDetail" + case appStoreState = "appStoreState" + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + case appStoreVersionPhasedRelease = "appStoreVersionPhasedRelease" + case appStoreVersionSubmission = "appStoreVersionSubmission" + case build = "build" + case copyright = "copyright" + case createdDate = "createdDate" + case downloadable = "downloadable" + case earliestReleaseDate = "earliestReleaseDate" + case idfaDeclaration = "idfaDeclaration" + case platform = "platform" + case releaseType = "releaseType" + case routingAppCoverage = "routingAppCoverage" + case usesIdfa = "usesIdfa" + case versionString = "versionString" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case ageRatingDeclaration = "ageRatingDeclaration" + case app = "app" + case appStoreReviewDetail = "appStoreReviewDetail" + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + case appStoreVersionPhasedRelease = "appStoreVersionPhasedRelease" + case appStoreVersionSubmission = "appStoreVersionSubmission" + case build = "build" + case idfaDeclaration = "idfaDeclaration" + case routingAppCoverage = "routingAppCoverage" + } + + /** the fields to include for returned resources of type appStoreVersionLocalizations */ + public enum FieldsappStoreVersionLocalizations: String, Codable, Equatable, CaseIterable { + case appPreviewSets = "appPreviewSets" + case appScreenshotSets = "appScreenshotSets" + case appStoreVersion = "appStoreVersion" + case description = "description" + case keywords = "keywords" + case locale = "locale" + case marketingUrl = "marketingUrl" + case promotionalText = "promotionalText" + case supportUrl = "supportUrl" + case whatsNew = "whatsNew" + } + + /** the fields to include for returned resources of type idfaDeclarations */ + public enum FieldsidfaDeclarations: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + case attributesActionWithPreviousAd = "attributesActionWithPreviousAd" + case attributesAppInstallationToPreviousAd = "attributesAppInstallationToPreviousAd" + case honorsLimitedAdTracking = "honorsLimitedAdTracking" + case servesAds = "servesAds" + } + + /** the fields to include for returned resources of type routingAppCoverages */ + public enum FieldsroutingAppCoverages: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + case assetDeliveryState = "assetDeliveryState" + case fileName = "fileName" + case fileSize = "fileSize" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + } + + /** the fields to include for returned resources of type appStoreVersionPhasedReleases */ + public enum FieldsappStoreVersionPhasedReleases: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + case currentDayNumber = "currentDayNumber" + case phasedReleaseState = "phasedReleaseState" + case startDate = "startDate" + case totalPauseDuration = "totalPauseDuration" + } + + /** the fields to include for returned resources of type ageRatingDeclarations */ + public enum FieldsageRatingDeclarations: String, Codable, Equatable, CaseIterable { + case alcoholTobaccoOrDrugUseOrReferences = "alcoholTobaccoOrDrugUseOrReferences" + case gamblingAndContests = "gamblingAndContests" + case gamblingSimulated = "gamblingSimulated" + case horrorOrFearThemes = "horrorOrFearThemes" + case kidsAgeBand = "kidsAgeBand" + case matureOrSuggestiveThemes = "matureOrSuggestiveThemes" + case medicalOrTreatmentInformation = "medicalOrTreatmentInformation" + case profanityOrCrudeHumor = "profanityOrCrudeHumor" + case sexualContentGraphicAndNudity = "sexualContentGraphicAndNudity" + case sexualContentOrNudity = "sexualContentOrNudity" + case unrestrictedWebAccess = "unrestrictedWebAccess" + case violenceCartoonOrFantasy = "violenceCartoonOrFantasy" + case violenceRealistic = "violenceRealistic" + case violenceRealisticProlongedGraphicOrSadistic = "violenceRealisticProlongedGraphicOrSadistic" + } + + /** the fields to include for returned resources of type appStoreReviewDetails */ + public enum FieldsappStoreReviewDetails: String, Codable, Equatable, CaseIterable { + case appStoreReviewAttachments = "appStoreReviewAttachments" + case appStoreVersion = "appStoreVersion" + case contactEmail = "contactEmail" + case contactFirstName = "contactFirstName" + case contactLastName = "contactLastName" + case contactPhone = "contactPhone" + case demoAccountName = "demoAccountName" + case demoAccountPassword = "demoAccountPassword" + case demoAccountRequired = "demoAccountRequired" + case notes = "notes" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + /** the fields to include for returned resources of type appStoreVersionSubmissions */ + public enum FieldsappStoreVersionSubmissions: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appStoreVersions */ + public var fieldsappStoreVersions: [FieldsappStoreVersions]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type appStoreVersionLocalizations */ + public var fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? + + /** the fields to include for returned resources of type idfaDeclarations */ + public var fieldsidfaDeclarations: [FieldsidfaDeclarations]? + + /** the fields to include for returned resources of type routingAppCoverages */ + public var fieldsroutingAppCoverages: [FieldsroutingAppCoverages]? + + /** the fields to include for returned resources of type appStoreVersionPhasedReleases */ + public var fieldsappStoreVersionPhasedReleases: [FieldsappStoreVersionPhasedReleases]? + + /** the fields to include for returned resources of type ageRatingDeclarations */ + public var fieldsageRatingDeclarations: [FieldsageRatingDeclarations]? + + /** the fields to include for returned resources of type appStoreReviewDetails */ + public var fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** the fields to include for returned resources of type appStoreVersionSubmissions */ + public var fieldsappStoreVersionSubmissions: [FieldsappStoreVersionSubmissions]? + + /** maximum number of related appStoreVersionLocalizations returned (when they are included) */ + public var limitappStoreVersionLocalizations: Int? + + public init(id: String, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, include: [Include]? = nil, fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? = nil, fieldsidfaDeclarations: [FieldsidfaDeclarations]? = nil, fieldsroutingAppCoverages: [FieldsroutingAppCoverages]? = nil, fieldsappStoreVersionPhasedReleases: [FieldsappStoreVersionPhasedReleases]? = nil, fieldsageRatingDeclarations: [FieldsageRatingDeclarations]? = nil, fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsappStoreVersionSubmissions: [FieldsappStoreVersionSubmissions]? = nil, limitappStoreVersionLocalizations: Int? = nil) { + self.id = id + self.fieldsappStoreVersions = fieldsappStoreVersions + self.include = include + self.fieldsappStoreVersionLocalizations = fieldsappStoreVersionLocalizations + self.fieldsidfaDeclarations = fieldsidfaDeclarations + self.fieldsroutingAppCoverages = fieldsroutingAppCoverages + self.fieldsappStoreVersionPhasedReleases = fieldsappStoreVersionPhasedReleases + self.fieldsageRatingDeclarations = fieldsageRatingDeclarations + self.fieldsappStoreReviewDetails = fieldsappStoreReviewDetails + self.fieldsbuilds = fieldsbuilds + self.fieldsappStoreVersionSubmissions = fieldsappStoreVersionSubmissions + self.limitappStoreVersionLocalizations = limitappStoreVersionLocalizations + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, include: [Include]? = nil, fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? = nil, fieldsidfaDeclarations: [FieldsidfaDeclarations]? = nil, fieldsroutingAppCoverages: [FieldsroutingAppCoverages]? = nil, fieldsappStoreVersionPhasedReleases: [FieldsappStoreVersionPhasedReleases]? = nil, fieldsageRatingDeclarations: [FieldsageRatingDeclarations]? = nil, fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsappStoreVersionSubmissions: [FieldsappStoreVersionSubmissions]? = nil, limitappStoreVersionLocalizations: Int? = nil) { + let options = Options(id: id, fieldsappStoreVersions: fieldsappStoreVersions, include: include, fieldsappStoreVersionLocalizations: fieldsappStoreVersionLocalizations, fieldsidfaDeclarations: fieldsidfaDeclarations, fieldsroutingAppCoverages: fieldsroutingAppCoverages, fieldsappStoreVersionPhasedReleases: fieldsappStoreVersionPhasedReleases, fieldsageRatingDeclarations: fieldsageRatingDeclarations, fieldsappStoreReviewDetails: fieldsappStoreReviewDetails, fieldsbuilds: fieldsbuilds, fieldsappStoreVersionSubmissions: fieldsappStoreVersionSubmissions, limitappStoreVersionLocalizations: limitappStoreVersionLocalizations) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappStoreVersions = options.fieldsappStoreVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersions]"] = fieldsappStoreVersions + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsappStoreVersionLocalizations = options.fieldsappStoreVersionLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersionLocalizations]"] = fieldsappStoreVersionLocalizations + } + if let fieldsidfaDeclarations = options.fieldsidfaDeclarations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[idfaDeclarations]"] = fieldsidfaDeclarations + } + if let fieldsroutingAppCoverages = options.fieldsroutingAppCoverages?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[routingAppCoverages]"] = fieldsroutingAppCoverages + } + if let fieldsappStoreVersionPhasedReleases = options.fieldsappStoreVersionPhasedReleases?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersionPhasedReleases]"] = fieldsappStoreVersionPhasedReleases + } + if let fieldsageRatingDeclarations = options.fieldsageRatingDeclarations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[ageRatingDeclarations]"] = fieldsageRatingDeclarations + } + if let fieldsappStoreReviewDetails = options.fieldsappStoreReviewDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreReviewDetails]"] = fieldsappStoreReviewDetails + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let fieldsappStoreVersionSubmissions = options.fieldsappStoreVersionSubmissions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersionSubmissions]"] = fieldsappStoreVersionSubmissions + } + if let limitappStoreVersionLocalizations = options.limitappStoreVersionLocalizations { + params["limit[appStoreVersionLocalizations]"] = limitappStoreVersionLocalizations + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionResponse + + /** Single AppStoreVersion */ + case status200(AppStoreVersionResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppStoreVersionResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreVersionResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsIdfaDeclarationGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsIdfaDeclarationGetToOneRelated.swift new file mode 100644 index 000000000..f1e0b5cb0 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsIdfaDeclarationGetToOneRelated.swift @@ -0,0 +1,158 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersions { + + public enum AppStoreVersionsIdfaDeclarationGetToOneRelated { + + public static let service = APIService(id: "appStoreVersions-idfaDeclaration-get_to_one_related", tag: "AppStoreVersions", method: "GET", path: "/v1/appStoreVersions/{id}/idfaDeclaration", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type idfaDeclarations */ + public enum FieldsidfaDeclarations: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + case attributesActionWithPreviousAd = "attributesActionWithPreviousAd" + case attributesAppInstallationToPreviousAd = "attributesAppInstallationToPreviousAd" + case honorsLimitedAdTracking = "honorsLimitedAdTracking" + case servesAds = "servesAds" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type idfaDeclarations */ + public var fieldsidfaDeclarations: [FieldsidfaDeclarations]? + + public init(id: String, fieldsidfaDeclarations: [FieldsidfaDeclarations]? = nil) { + self.id = id + self.fieldsidfaDeclarations = fieldsidfaDeclarations + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionsIdfaDeclarationGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsidfaDeclarations: [FieldsidfaDeclarations]? = nil) { + let options = Options(id: id, fieldsidfaDeclarations: fieldsidfaDeclarations) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsidfaDeclarations = options.fieldsidfaDeclarations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[idfaDeclarations]"] = fieldsidfaDeclarations + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = IdfaDeclarationResponse + + /** Related resource */ + case status200(IdfaDeclarationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: IdfaDeclarationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(IdfaDeclarationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsRoutingAppCoverageGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsRoutingAppCoverageGetToOneRelated.swift new file mode 100644 index 000000000..647e64b33 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsRoutingAppCoverageGetToOneRelated.swift @@ -0,0 +1,160 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersions { + + public enum AppStoreVersionsRoutingAppCoverageGetToOneRelated { + + public static let service = APIService(id: "appStoreVersions-routingAppCoverage-get_to_one_related", tag: "AppStoreVersions", method: "GET", path: "/v1/appStoreVersions/{id}/routingAppCoverage", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type routingAppCoverages */ + public enum FieldsroutingAppCoverages: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + case assetDeliveryState = "assetDeliveryState" + case fileName = "fileName" + case fileSize = "fileSize" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type routingAppCoverages */ + public var fieldsroutingAppCoverages: [FieldsroutingAppCoverages]? + + public init(id: String, fieldsroutingAppCoverages: [FieldsroutingAppCoverages]? = nil) { + self.id = id + self.fieldsroutingAppCoverages = fieldsroutingAppCoverages + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppStoreVersionsRoutingAppCoverageGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsroutingAppCoverages: [FieldsroutingAppCoverages]? = nil) { + let options = Options(id: id, fieldsroutingAppCoverages: fieldsroutingAppCoverages) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsroutingAppCoverages = options.fieldsroutingAppCoverages?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[routingAppCoverages]"] = fieldsroutingAppCoverages + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = RoutingAppCoverageResponse + + /** Related resource */ + case status200(RoutingAppCoverageResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: RoutingAppCoverageResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(RoutingAppCoverageResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsUpdateInstance.swift new file mode 100644 index 000000000..e4498f1c5 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/AppStoreVersions/AppStoreVersionsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.AppStoreVersions { + + public enum AppStoreVersionsUpdateInstance { + + public static let service = APIService(id: "appStoreVersions-update_instance", tag: "AppStoreVersions", method: "PATCH", path: "/v1/appStoreVersions/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppStoreVersionUpdateRequest + + public init(body: AppStoreVersionUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppStoreVersionsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppStoreVersionUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionResponse + + /** Single AppStoreVersion */ + case status200(AppStoreVersionResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppStoreVersionResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreVersionResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsAppInfosGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsAppInfosGetToManyRelated.swift new file mode 100644 index 000000000..922580546 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsAppInfosGetToManyRelated.swift @@ -0,0 +1,256 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsAppInfosGetToManyRelated { + + public static let service = APIService(id: "apps-appInfos-get_to_many_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/appInfos", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appInfos */ + public enum FieldsappInfos: String, Codable, Equatable, CaseIterable { + case app = "app" + case appInfoLocalizations = "appInfoLocalizations" + case appStoreAgeRating = "appStoreAgeRating" + case appStoreState = "appStoreState" + case brazilAgeRating = "brazilAgeRating" + case kidsAgeBand = "kidsAgeBand" + case primaryCategory = "primaryCategory" + case primarySubcategoryOne = "primarySubcategoryOne" + case primarySubcategoryTwo = "primarySubcategoryTwo" + case secondaryCategory = "secondaryCategory" + case secondarySubcategoryOne = "secondarySubcategoryOne" + case secondarySubcategoryTwo = "secondarySubcategoryTwo" + } + + /** the fields to include for returned resources of type appCategories */ + public enum FieldsappCategories: String, Codable, Equatable, CaseIterable { + case parent = "parent" + case platforms = "platforms" + case subcategories = "subcategories" + } + + /** the fields to include for returned resources of type appInfoLocalizations */ + public enum FieldsappInfoLocalizations: String, Codable, Equatable, CaseIterable { + case appInfo = "appInfo" + case locale = "locale" + case name = "name" + case privacyPolicyText = "privacyPolicyText" + case privacyPolicyUrl = "privacyPolicyUrl" + case subtitle = "subtitle" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case appInfoLocalizations = "appInfoLocalizations" + case primaryCategory = "primaryCategory" + case primarySubcategoryOne = "primarySubcategoryOne" + case primarySubcategoryTwo = "primarySubcategoryTwo" + case secondaryCategory = "secondaryCategory" + case secondarySubcategoryOne = "secondarySubcategoryOne" + case secondarySubcategoryTwo = "secondarySubcategoryTwo" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appInfos */ + public var fieldsappInfos: [FieldsappInfos]? + + /** the fields to include for returned resources of type appCategories */ + public var fieldsappCategories: [FieldsappCategories]? + + /** the fields to include for returned resources of type appInfoLocalizations */ + public var fieldsappInfoLocalizations: [FieldsappInfoLocalizations]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, fieldsappInfos: [FieldsappInfos]? = nil, fieldsappCategories: [FieldsappCategories]? = nil, fieldsappInfoLocalizations: [FieldsappInfoLocalizations]? = nil, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil, include: [Include]? = nil) { + self.id = id + self.fieldsappInfos = fieldsappInfos + self.fieldsappCategories = fieldsappCategories + self.fieldsappInfoLocalizations = fieldsappInfoLocalizations + self.fieldsapps = fieldsapps + self.limit = limit + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsAppInfosGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappInfos: [FieldsappInfos]? = nil, fieldsappCategories: [FieldsappCategories]? = nil, fieldsappInfoLocalizations: [FieldsappInfoLocalizations]? = nil, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil, include: [Include]? = nil) { + let options = Options(id: id, fieldsappInfos: fieldsappInfos, fieldsappCategories: fieldsappCategories, fieldsappInfoLocalizations: fieldsappInfoLocalizations, fieldsapps: fieldsapps, limit: limit, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappInfos = options.fieldsappInfos?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appInfos]"] = fieldsappInfos + } + if let fieldsappCategories = options.fieldsappCategories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appCategories]"] = fieldsappCategories + } + if let fieldsappInfoLocalizations = options.fieldsappInfoLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appInfoLocalizations]"] = fieldsappInfoLocalizations + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppInfosResponse + + /** List of related resources */ + case status200(AppInfosResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppInfosResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppInfosResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsAppStoreVersionsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsAppStoreVersionsGetToManyRelated.swift new file mode 100644 index 000000000..9104f3b5c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsAppStoreVersionsGetToManyRelated.swift @@ -0,0 +1,448 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsAppStoreVersionsGetToManyRelated { + + public static let service = APIService(id: "apps-appStoreVersions-get_to_many_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/appStoreVersions", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'appStoreState' */ + public enum FilterappStoreState: String, Codable, Equatable, CaseIterable { + case developerRemovedFromSale = "DEVELOPER_REMOVED_FROM_SALE" + case developerRejected = "DEVELOPER_REJECTED" + case inReview = "IN_REVIEW" + case invalidBinary = "INVALID_BINARY" + case metadataRejected = "METADATA_REJECTED" + case pendingAppleRelease = "PENDING_APPLE_RELEASE" + case pendingContract = "PENDING_CONTRACT" + case pendingDeveloperRelease = "PENDING_DEVELOPER_RELEASE" + case prepareForSubmission = "PREPARE_FOR_SUBMISSION" + case preorderReadyForSale = "PREORDER_READY_FOR_SALE" + case processingForAppStore = "PROCESSING_FOR_APP_STORE" + case readyForSale = "READY_FOR_SALE" + case rejected = "REJECTED" + case removedFromSale = "REMOVED_FROM_SALE" + case waitingForExportCompliance = "WAITING_FOR_EXPORT_COMPLIANCE" + case waitingForReview = "WAITING_FOR_REVIEW" + case replacedWithNewVersion = "REPLACED_WITH_NEW_VERSION" + } + + /** filter by attribute 'platform' */ + public enum Filterplatform: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + case macOs = "MAC_OS" + case tvOs = "TV_OS" + } + + /** the fields to include for returned resources of type idfaDeclarations */ + public enum FieldsidfaDeclarations: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + case attributesActionWithPreviousAd = "attributesActionWithPreviousAd" + case attributesAppInstallationToPreviousAd = "attributesAppInstallationToPreviousAd" + case honorsLimitedAdTracking = "honorsLimitedAdTracking" + case servesAds = "servesAds" + } + + /** the fields to include for returned resources of type appStoreVersionLocalizations */ + public enum FieldsappStoreVersionLocalizations: String, Codable, Equatable, CaseIterable { + case appPreviewSets = "appPreviewSets" + case appScreenshotSets = "appScreenshotSets" + case appStoreVersion = "appStoreVersion" + case description = "description" + case keywords = "keywords" + case locale = "locale" + case marketingUrl = "marketingUrl" + case promotionalText = "promotionalText" + case supportUrl = "supportUrl" + case whatsNew = "whatsNew" + } + + /** the fields to include for returned resources of type routingAppCoverages */ + public enum FieldsroutingAppCoverages: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + case assetDeliveryState = "assetDeliveryState" + case fileName = "fileName" + case fileSize = "fileSize" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + } + + /** the fields to include for returned resources of type appStoreVersionPhasedReleases */ + public enum FieldsappStoreVersionPhasedReleases: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + case currentDayNumber = "currentDayNumber" + case phasedReleaseState = "phasedReleaseState" + case startDate = "startDate" + case totalPauseDuration = "totalPauseDuration" + } + + /** the fields to include for returned resources of type ageRatingDeclarations */ + public enum FieldsageRatingDeclarations: String, Codable, Equatable, CaseIterable { + case alcoholTobaccoOrDrugUseOrReferences = "alcoholTobaccoOrDrugUseOrReferences" + case gamblingAndContests = "gamblingAndContests" + case gamblingSimulated = "gamblingSimulated" + case horrorOrFearThemes = "horrorOrFearThemes" + case kidsAgeBand = "kidsAgeBand" + case matureOrSuggestiveThemes = "matureOrSuggestiveThemes" + case medicalOrTreatmentInformation = "medicalOrTreatmentInformation" + case profanityOrCrudeHumor = "profanityOrCrudeHumor" + case sexualContentGraphicAndNudity = "sexualContentGraphicAndNudity" + case sexualContentOrNudity = "sexualContentOrNudity" + case unrestrictedWebAccess = "unrestrictedWebAccess" + case violenceCartoonOrFantasy = "violenceCartoonOrFantasy" + case violenceRealistic = "violenceRealistic" + case violenceRealisticProlongedGraphicOrSadistic = "violenceRealisticProlongedGraphicOrSadistic" + } + + /** the fields to include for returned resources of type appStoreReviewDetails */ + public enum FieldsappStoreReviewDetails: String, Codable, Equatable, CaseIterable { + case appStoreReviewAttachments = "appStoreReviewAttachments" + case appStoreVersion = "appStoreVersion" + case contactEmail = "contactEmail" + case contactFirstName = "contactFirstName" + case contactLastName = "contactLastName" + case contactPhone = "contactPhone" + case demoAccountName = "demoAccountName" + case demoAccountPassword = "demoAccountPassword" + case demoAccountRequired = "demoAccountRequired" + case notes = "notes" + } + + /** the fields to include for returned resources of type appStoreVersions */ + public enum FieldsappStoreVersions: String, Codable, Equatable, CaseIterable { + case ageRatingDeclaration = "ageRatingDeclaration" + case app = "app" + case appStoreReviewDetail = "appStoreReviewDetail" + case appStoreState = "appStoreState" + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + case appStoreVersionPhasedRelease = "appStoreVersionPhasedRelease" + case appStoreVersionSubmission = "appStoreVersionSubmission" + case build = "build" + case copyright = "copyright" + case createdDate = "createdDate" + case downloadable = "downloadable" + case earliestReleaseDate = "earliestReleaseDate" + case idfaDeclaration = "idfaDeclaration" + case platform = "platform" + case releaseType = "releaseType" + case routingAppCoverage = "routingAppCoverage" + case usesIdfa = "usesIdfa" + case versionString = "versionString" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + /** the fields to include for returned resources of type appStoreVersionSubmissions */ + public enum FieldsappStoreVersionSubmissions: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case ageRatingDeclaration = "ageRatingDeclaration" + case app = "app" + case appStoreReviewDetail = "appStoreReviewDetail" + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + case appStoreVersionPhasedRelease = "appStoreVersionPhasedRelease" + case appStoreVersionSubmission = "appStoreVersionSubmission" + case build = "build" + case idfaDeclaration = "idfaDeclaration" + case routingAppCoverage = "routingAppCoverage" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** filter by attribute 'appStoreState' */ + public var filterappStoreState: [FilterappStoreState]? + + /** filter by attribute 'platform' */ + public var filterplatform: [Filterplatform]? + + /** filter by attribute 'versionString' */ + public var filterversionString: [String]? + + /** filter by id(s) */ + public var filterid: [String]? + + /** the fields to include for returned resources of type idfaDeclarations */ + public var fieldsidfaDeclarations: [FieldsidfaDeclarations]? + + /** the fields to include for returned resources of type appStoreVersionLocalizations */ + public var fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? + + /** the fields to include for returned resources of type routingAppCoverages */ + public var fieldsroutingAppCoverages: [FieldsroutingAppCoverages]? + + /** the fields to include for returned resources of type appStoreVersionPhasedReleases */ + public var fieldsappStoreVersionPhasedReleases: [FieldsappStoreVersionPhasedReleases]? + + /** the fields to include for returned resources of type ageRatingDeclarations */ + public var fieldsageRatingDeclarations: [FieldsageRatingDeclarations]? + + /** the fields to include for returned resources of type appStoreReviewDetails */ + public var fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? + + /** the fields to include for returned resources of type appStoreVersions */ + public var fieldsappStoreVersions: [FieldsappStoreVersions]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** the fields to include for returned resources of type appStoreVersionSubmissions */ + public var fieldsappStoreVersionSubmissions: [FieldsappStoreVersionSubmissions]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, filterappStoreState: [FilterappStoreState]? = nil, filterplatform: [Filterplatform]? = nil, filterversionString: [String]? = nil, filterid: [String]? = nil, fieldsidfaDeclarations: [FieldsidfaDeclarations]? = nil, fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? = nil, fieldsroutingAppCoverages: [FieldsroutingAppCoverages]? = nil, fieldsappStoreVersionPhasedReleases: [FieldsappStoreVersionPhasedReleases]? = nil, fieldsageRatingDeclarations: [FieldsageRatingDeclarations]? = nil, fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? = nil, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsappStoreVersionSubmissions: [FieldsappStoreVersionSubmissions]? = nil, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil, include: [Include]? = nil) { + self.id = id + self.filterappStoreState = filterappStoreState + self.filterplatform = filterplatform + self.filterversionString = filterversionString + self.filterid = filterid + self.fieldsidfaDeclarations = fieldsidfaDeclarations + self.fieldsappStoreVersionLocalizations = fieldsappStoreVersionLocalizations + self.fieldsroutingAppCoverages = fieldsroutingAppCoverages + self.fieldsappStoreVersionPhasedReleases = fieldsappStoreVersionPhasedReleases + self.fieldsageRatingDeclarations = fieldsageRatingDeclarations + self.fieldsappStoreReviewDetails = fieldsappStoreReviewDetails + self.fieldsappStoreVersions = fieldsappStoreVersions + self.fieldsbuilds = fieldsbuilds + self.fieldsappStoreVersionSubmissions = fieldsappStoreVersionSubmissions + self.fieldsapps = fieldsapps + self.limit = limit + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsAppStoreVersionsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, filterappStoreState: [FilterappStoreState]? = nil, filterplatform: [Filterplatform]? = nil, filterversionString: [String]? = nil, filterid: [String]? = nil, fieldsidfaDeclarations: [FieldsidfaDeclarations]? = nil, fieldsappStoreVersionLocalizations: [FieldsappStoreVersionLocalizations]? = nil, fieldsroutingAppCoverages: [FieldsroutingAppCoverages]? = nil, fieldsappStoreVersionPhasedReleases: [FieldsappStoreVersionPhasedReleases]? = nil, fieldsageRatingDeclarations: [FieldsageRatingDeclarations]? = nil, fieldsappStoreReviewDetails: [FieldsappStoreReviewDetails]? = nil, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsappStoreVersionSubmissions: [FieldsappStoreVersionSubmissions]? = nil, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil, include: [Include]? = nil) { + let options = Options(id: id, filterappStoreState: filterappStoreState, filterplatform: filterplatform, filterversionString: filterversionString, filterid: filterid, fieldsidfaDeclarations: fieldsidfaDeclarations, fieldsappStoreVersionLocalizations: fieldsappStoreVersionLocalizations, fieldsroutingAppCoverages: fieldsroutingAppCoverages, fieldsappStoreVersionPhasedReleases: fieldsappStoreVersionPhasedReleases, fieldsageRatingDeclarations: fieldsageRatingDeclarations, fieldsappStoreReviewDetails: fieldsappStoreReviewDetails, fieldsappStoreVersions: fieldsappStoreVersions, fieldsbuilds: fieldsbuilds, fieldsappStoreVersionSubmissions: fieldsappStoreVersionSubmissions, fieldsapps: fieldsapps, limit: limit, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterappStoreState = options.filterappStoreState?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[appStoreState]"] = filterappStoreState + } + if let filterplatform = options.filterplatform?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[platform]"] = filterplatform + } + if let filterversionString = options.filterversionString?.joined(separator: ",") { + params["filter[versionString]"] = filterversionString + } + if let filterid = options.filterid?.joined(separator: ",") { + params["filter[id]"] = filterid + } + if let fieldsidfaDeclarations = options.fieldsidfaDeclarations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[idfaDeclarations]"] = fieldsidfaDeclarations + } + if let fieldsappStoreVersionLocalizations = options.fieldsappStoreVersionLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersionLocalizations]"] = fieldsappStoreVersionLocalizations + } + if let fieldsroutingAppCoverages = options.fieldsroutingAppCoverages?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[routingAppCoverages]"] = fieldsroutingAppCoverages + } + if let fieldsappStoreVersionPhasedReleases = options.fieldsappStoreVersionPhasedReleases?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersionPhasedReleases]"] = fieldsappStoreVersionPhasedReleases + } + if let fieldsageRatingDeclarations = options.fieldsageRatingDeclarations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[ageRatingDeclarations]"] = fieldsageRatingDeclarations + } + if let fieldsappStoreReviewDetails = options.fieldsappStoreReviewDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreReviewDetails]"] = fieldsappStoreReviewDetails + } + if let fieldsappStoreVersions = options.fieldsappStoreVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersions]"] = fieldsappStoreVersions + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let fieldsappStoreVersionSubmissions = options.fieldsappStoreVersionSubmissions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersionSubmissions]"] = fieldsappStoreVersionSubmissions + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionsResponse + + /** List of related resources */ + case status200(AppStoreVersionsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppStoreVersionsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreVersionsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsAvailableTerritoriesGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsAvailableTerritoriesGetToManyRelated.swift new file mode 100644 index 000000000..3c7f1ce47 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsAvailableTerritoriesGetToManyRelated.swift @@ -0,0 +1,161 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsAvailableTerritoriesGetToManyRelated { + + public static let service = APIService(id: "apps-availableTerritories-get_to_many_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/availableTerritories", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type territories */ + public enum Fieldsterritories: String, Codable, Equatable, CaseIterable { + case currency = "currency" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type territories */ + public var fieldsterritories: [Fieldsterritories]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsterritories: [Fieldsterritories]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsterritories = fieldsterritories + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsAvailableTerritoriesGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsterritories: [Fieldsterritories]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsterritories: fieldsterritories, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsterritories = options.fieldsterritories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[territories]"] = fieldsterritories + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = TerritoriesResponse + + /** List of related resources */ + case status200(TerritoriesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: TerritoriesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(TerritoriesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaAppLocalizationsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaAppLocalizationsGetToManyRelated.swift new file mode 100644 index 000000000..9d86d32c3 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaAppLocalizationsGetToManyRelated.swift @@ -0,0 +1,167 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsBetaAppLocalizationsGetToManyRelated { + + public static let service = APIService(id: "apps-betaAppLocalizations-get_to_many_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/betaAppLocalizations", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaAppLocalizations */ + public enum FieldsbetaAppLocalizations: String, Codable, Equatable, CaseIterable { + case app = "app" + case description = "description" + case feedbackEmail = "feedbackEmail" + case locale = "locale" + case marketingUrl = "marketingUrl" + case privacyPolicyUrl = "privacyPolicyUrl" + case tvOsPrivacyPolicy = "tvOsPrivacyPolicy" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaAppLocalizations */ + public var fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsbetaAppLocalizations = fieldsbetaAppLocalizations + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsBetaAppLocalizationsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsbetaAppLocalizations: fieldsbetaAppLocalizations, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaAppLocalizations = options.fieldsbetaAppLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppLocalizations]"] = fieldsbetaAppLocalizations + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaAppLocalizationsResponse + + /** List of related resources */ + case status200(BetaAppLocalizationsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaAppLocalizationsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaAppLocalizationsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaAppReviewDetailGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaAppReviewDetailGetToOneRelated.swift new file mode 100644 index 000000000..a5a65a90e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaAppReviewDetailGetToOneRelated.swift @@ -0,0 +1,162 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsBetaAppReviewDetailGetToOneRelated { + + public static let service = APIService(id: "apps-betaAppReviewDetail-get_to_one_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/betaAppReviewDetail", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaAppReviewDetails */ + public enum FieldsbetaAppReviewDetails: String, Codable, Equatable, CaseIterable { + case app = "app" + case contactEmail = "contactEmail" + case contactFirstName = "contactFirstName" + case contactLastName = "contactLastName" + case contactPhone = "contactPhone" + case demoAccountName = "demoAccountName" + case demoAccountPassword = "demoAccountPassword" + case demoAccountRequired = "demoAccountRequired" + case notes = "notes" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaAppReviewDetails */ + public var fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? + + public init(id: String, fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? = nil) { + self.id = id + self.fieldsbetaAppReviewDetails = fieldsbetaAppReviewDetails + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsBetaAppReviewDetailGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? = nil) { + let options = Options(id: id, fieldsbetaAppReviewDetails: fieldsbetaAppReviewDetails) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaAppReviewDetails = options.fieldsbetaAppReviewDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppReviewDetails]"] = fieldsbetaAppReviewDetails + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaAppReviewDetailResponse + + /** Related resource */ + case status200(BetaAppReviewDetailResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaAppReviewDetailResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaAppReviewDetailResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaGroupsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaGroupsGetToManyRelated.swift new file mode 100644 index 000000000..92b6c6a3f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaGroupsGetToManyRelated.swift @@ -0,0 +1,172 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsBetaGroupsGetToManyRelated { + + public static let service = APIService(id: "apps-betaGroups-get_to_many_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/betaGroups", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaGroups */ + public enum FieldsbetaGroups: String, Codable, Equatable, CaseIterable { + case app = "app" + case betaTesters = "betaTesters" + case builds = "builds" + case createdDate = "createdDate" + case feedbackEnabled = "feedbackEnabled" + case isInternalGroup = "isInternalGroup" + case name = "name" + case publicLink = "publicLink" + case publicLinkEnabled = "publicLinkEnabled" + case publicLinkId = "publicLinkId" + case publicLinkLimit = "publicLinkLimit" + case publicLinkLimitEnabled = "publicLinkLimitEnabled" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaGroups */ + public var fieldsbetaGroups: [FieldsbetaGroups]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsbetaGroups: [FieldsbetaGroups]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsbetaGroups = fieldsbetaGroups + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsBetaGroupsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaGroups: [FieldsbetaGroups]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsbetaGroups: fieldsbetaGroups, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaGroups = options.fieldsbetaGroups?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaGroups]"] = fieldsbetaGroups + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaGroupsResponse + + /** List of related resources */ + case status200(BetaGroupsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaGroupsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaGroupsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaLicenseAgreementGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaLicenseAgreementGetToOneRelated.swift new file mode 100644 index 000000000..f0ef40abc --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaLicenseAgreementGetToOneRelated.swift @@ -0,0 +1,155 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsBetaLicenseAgreementGetToOneRelated { + + public static let service = APIService(id: "apps-betaLicenseAgreement-get_to_one_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/betaLicenseAgreement", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaLicenseAgreements */ + public enum FieldsbetaLicenseAgreements: String, Codable, Equatable, CaseIterable { + case agreementText = "agreementText" + case app = "app" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaLicenseAgreements */ + public var fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? + + public init(id: String, fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? = nil) { + self.id = id + self.fieldsbetaLicenseAgreements = fieldsbetaLicenseAgreements + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsBetaLicenseAgreementGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? = nil) { + let options = Options(id: id, fieldsbetaLicenseAgreements: fieldsbetaLicenseAgreements) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaLicenseAgreements = options.fieldsbetaLicenseAgreements?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaLicenseAgreements]"] = fieldsbetaLicenseAgreements + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaLicenseAgreementResponse + + /** Related resource */ + case status200(BetaLicenseAgreementResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaLicenseAgreementResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaLicenseAgreementResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaTestersDeleteToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaTestersDeleteToManyRelationship.swift new file mode 100644 index 000000000..695f58194 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBetaTestersDeleteToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsBetaTestersDeleteToManyRelationship { + + public static let service = APIService(id: "apps-betaTesters-delete_to_many_relationship", tag: "Apps", method: "DELETE", path: "/v1/apps/{id}/relationships/betaTesters", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppBetaTestersLinkagesRequest + + public init(body: AppBetaTestersLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppsBetaTestersDeleteToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppBetaTestersLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBuildsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBuildsGetToManyRelated.swift new file mode 100644 index 000000000..f91505f92 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsBuildsGetToManyRelated.swift @@ -0,0 +1,180 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsBuildsGetToManyRelated { + + public static let service = APIService(id: "apps-builds-get_to_many_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/builds", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsbuilds = fieldsbuilds + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsBuildsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsbuilds: fieldsbuilds, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildsResponse + + /** List of related resources */ + case status200(BuildsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BuildsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsEndUserLicenseAgreementGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsEndUserLicenseAgreementGetToOneRelated.swift new file mode 100644 index 000000000..501e7c232 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsEndUserLicenseAgreementGetToOneRelated.swift @@ -0,0 +1,156 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsEndUserLicenseAgreementGetToOneRelated { + + public static let service = APIService(id: "apps-endUserLicenseAgreement-get_to_one_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/endUserLicenseAgreement", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type endUserLicenseAgreements */ + public enum FieldsendUserLicenseAgreements: String, Codable, Equatable, CaseIterable { + case agreementText = "agreementText" + case app = "app" + case territories = "territories" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type endUserLicenseAgreements */ + public var fieldsendUserLicenseAgreements: [FieldsendUserLicenseAgreements]? + + public init(id: String, fieldsendUserLicenseAgreements: [FieldsendUserLicenseAgreements]? = nil) { + self.id = id + self.fieldsendUserLicenseAgreements = fieldsendUserLicenseAgreements + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsEndUserLicenseAgreementGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsendUserLicenseAgreements: [FieldsendUserLicenseAgreements]? = nil) { + let options = Options(id: id, fieldsendUserLicenseAgreements: fieldsendUserLicenseAgreements) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsendUserLicenseAgreements = options.fieldsendUserLicenseAgreements?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[endUserLicenseAgreements]"] = fieldsendUserLicenseAgreements + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = EndUserLicenseAgreementResponse + + /** Related resource */ + case status200(EndUserLicenseAgreementResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: EndUserLicenseAgreementResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(EndUserLicenseAgreementResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGameCenterEnabledVersionsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGameCenterEnabledVersionsGetToManyRelated.swift new file mode 100644 index 000000000..243032ae4 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGameCenterEnabledVersionsGetToManyRelated.swift @@ -0,0 +1,253 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsGameCenterEnabledVersionsGetToManyRelated { + + public static let service = APIService(id: "apps-gameCenterEnabledVersions-get_to_many_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/gameCenterEnabledVersions", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'platform' */ + public enum Filterplatform: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + case macOs = "MAC_OS" + case tvOs = "TV_OS" + } + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public enum Sort: String, Codable, Equatable, CaseIterable { + case versionString = "versionString" + case versionString = "-versionString" + } + + /** the fields to include for returned resources of type gameCenterEnabledVersions */ + public enum FieldsgameCenterEnabledVersions: String, Codable, Equatable, CaseIterable { + case app = "app" + case compatibleVersions = "compatibleVersions" + case iconAsset = "iconAsset" + case platform = "platform" + case versionString = "versionString" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case compatibleVersions = "compatibleVersions" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** filter by attribute 'platform' */ + public var filterplatform: [Filterplatform]? + + /** filter by attribute 'versionString' */ + public var filterversionString: [String]? + + /** filter by id(s) */ + public var filterid: [String]? + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public var sort: [Sort]? + + /** the fields to include for returned resources of type gameCenterEnabledVersions */ + public var fieldsgameCenterEnabledVersions: [FieldsgameCenterEnabledVersions]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, filterplatform: [Filterplatform]? = nil, filterversionString: [String]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldsgameCenterEnabledVersions: [FieldsgameCenterEnabledVersions]? = nil, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil, include: [Include]? = nil) { + self.id = id + self.filterplatform = filterplatform + self.filterversionString = filterversionString + self.filterid = filterid + self.sort = sort + self.fieldsgameCenterEnabledVersions = fieldsgameCenterEnabledVersions + self.fieldsapps = fieldsapps + self.limit = limit + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsGameCenterEnabledVersionsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, filterplatform: [Filterplatform]? = nil, filterversionString: [String]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldsgameCenterEnabledVersions: [FieldsgameCenterEnabledVersions]? = nil, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil, include: [Include]? = nil) { + let options = Options(id: id, filterplatform: filterplatform, filterversionString: filterversionString, filterid: filterid, sort: sort, fieldsgameCenterEnabledVersions: fieldsgameCenterEnabledVersions, fieldsapps: fieldsapps, limit: limit, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterplatform = options.filterplatform?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[platform]"] = filterplatform + } + if let filterversionString = options.filterversionString?.joined(separator: ",") { + params["filter[versionString]"] = filterversionString + } + if let filterid = options.filterid?.joined(separator: ",") { + params["filter[id]"] = filterid + } + if let sort = options.sort?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["sort"] = sort + } + if let fieldsgameCenterEnabledVersions = options.fieldsgameCenterEnabledVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[gameCenterEnabledVersions]"] = fieldsgameCenterEnabledVersions + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = GameCenterEnabledVersionsResponse + + /** List of related resources */ + case status200(GameCenterEnabledVersionsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: GameCenterEnabledVersionsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(GameCenterEnabledVersionsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGetCollection.swift new file mode 100644 index 000000000..018f5837e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGetCollection.swift @@ -0,0 +1,634 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsGetCollection { + + public static let service = APIService(id: "apps-get_collection", tag: "Apps", method: "GET", path: "/v1/apps", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'appStoreVersions.appStoreState' */ + public enum FilterappStoreVersionsAppStoreState: String, Codable, Equatable, CaseIterable { + case developerRemovedFromSale = "DEVELOPER_REMOVED_FROM_SALE" + case developerRejected = "DEVELOPER_REJECTED" + case inReview = "IN_REVIEW" + case invalidBinary = "INVALID_BINARY" + case metadataRejected = "METADATA_REJECTED" + case pendingAppleRelease = "PENDING_APPLE_RELEASE" + case pendingContract = "PENDING_CONTRACT" + case pendingDeveloperRelease = "PENDING_DEVELOPER_RELEASE" + case prepareForSubmission = "PREPARE_FOR_SUBMISSION" + case preorderReadyForSale = "PREORDER_READY_FOR_SALE" + case processingForAppStore = "PROCESSING_FOR_APP_STORE" + case readyForSale = "READY_FOR_SALE" + case rejected = "REJECTED" + case removedFromSale = "REMOVED_FROM_SALE" + case waitingForExportCompliance = "WAITING_FOR_EXPORT_COMPLIANCE" + case waitingForReview = "WAITING_FOR_REVIEW" + case replacedWithNewVersion = "REPLACED_WITH_NEW_VERSION" + } + + /** filter by attribute 'appStoreVersions.platform' */ + public enum FilterappStoreVersionsPlatform: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + case macOs = "MAC_OS" + case tvOs = "TV_OS" + } + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public enum Sort: String, Codable, Equatable, CaseIterable { + case bundleId = "bundleId" + case bundleId = "-bundleId" + case name = "name" + case name = "-name" + case sku = "sku" + case sku = "-sku" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case builds = "builds" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + } + + /** the fields to include for returned resources of type betaGroups */ + public enum FieldsbetaGroups: String, Codable, Equatable, CaseIterable { + case app = "app" + case betaTesters = "betaTesters" + case builds = "builds" + case createdDate = "createdDate" + case feedbackEnabled = "feedbackEnabled" + case isInternalGroup = "isInternalGroup" + case name = "name" + case publicLink = "publicLink" + case publicLinkEnabled = "publicLinkEnabled" + case publicLinkId = "publicLinkId" + case publicLinkLimit = "publicLinkLimit" + case publicLinkLimitEnabled = "publicLinkLimitEnabled" + } + + /** the fields to include for returned resources of type perfPowerMetrics */ + public enum FieldsperfPowerMetrics: String, Codable, Equatable, CaseIterable { + case deviceType = "deviceType" + case metricType = "metricType" + case platform = "platform" + } + + /** the fields to include for returned resources of type appInfos */ + public enum FieldsappInfos: String, Codable, Equatable, CaseIterable { + case app = "app" + case appInfoLocalizations = "appInfoLocalizations" + case appStoreAgeRating = "appStoreAgeRating" + case appStoreState = "appStoreState" + case brazilAgeRating = "brazilAgeRating" + case kidsAgeBand = "kidsAgeBand" + case primaryCategory = "primaryCategory" + case primarySubcategoryOne = "primarySubcategoryOne" + case primarySubcategoryTwo = "primarySubcategoryTwo" + case secondaryCategory = "secondaryCategory" + case secondarySubcategoryOne = "secondarySubcategoryOne" + case secondarySubcategoryTwo = "secondarySubcategoryTwo" + } + + /** the fields to include for returned resources of type appPreOrders */ + public enum FieldsappPreOrders: String, Codable, Equatable, CaseIterable { + case app = "app" + case appReleaseDate = "appReleaseDate" + case preOrderAvailableDate = "preOrderAvailableDate" + } + + /** the fields to include for returned resources of type preReleaseVersions */ + public enum FieldspreReleaseVersions: String, Codable, Equatable, CaseIterable { + case app = "app" + case builds = "builds" + case platform = "platform" + case version = "version" + } + + /** the fields to include for returned resources of type appPrices */ + public enum FieldsappPrices: String, Codable, Equatable, CaseIterable { + case app = "app" + case priceTier = "priceTier" + } + + /** the fields to include for returned resources of type inAppPurchases */ + public enum FieldsinAppPurchases: String, Codable, Equatable, CaseIterable { + case apps = "apps" + case inAppPurchaseType = "inAppPurchaseType" + case productId = "productId" + case referenceName = "referenceName" + case state = "state" + } + + /** the fields to include for returned resources of type betaAppReviewDetails */ + public enum FieldsbetaAppReviewDetails: String, Codable, Equatable, CaseIterable { + case app = "app" + case contactEmail = "contactEmail" + case contactFirstName = "contactFirstName" + case contactLastName = "contactLastName" + case contactPhone = "contactPhone" + case demoAccountName = "demoAccountName" + case demoAccountPassword = "demoAccountPassword" + case demoAccountRequired = "demoAccountRequired" + case notes = "notes" + } + + /** the fields to include for returned resources of type territories */ + public enum Fieldsterritories: String, Codable, Equatable, CaseIterable { + case currency = "currency" + } + + /** the fields to include for returned resources of type gameCenterEnabledVersions */ + public enum FieldsgameCenterEnabledVersions: String, Codable, Equatable, CaseIterable { + case app = "app" + case compatibleVersions = "compatibleVersions" + case iconAsset = "iconAsset" + case platform = "platform" + case versionString = "versionString" + } + + /** the fields to include for returned resources of type appStoreVersions */ + public enum FieldsappStoreVersions: String, Codable, Equatable, CaseIterable { + case ageRatingDeclaration = "ageRatingDeclaration" + case app = "app" + case appStoreReviewDetail = "appStoreReviewDetail" + case appStoreState = "appStoreState" + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + case appStoreVersionPhasedRelease = "appStoreVersionPhasedRelease" + case appStoreVersionSubmission = "appStoreVersionSubmission" + case build = "build" + case copyright = "copyright" + case createdDate = "createdDate" + case downloadable = "downloadable" + case earliestReleaseDate = "earliestReleaseDate" + case idfaDeclaration = "idfaDeclaration" + case platform = "platform" + case releaseType = "releaseType" + case routingAppCoverage = "routingAppCoverage" + case usesIdfa = "usesIdfa" + case versionString = "versionString" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + /** the fields to include for returned resources of type betaAppLocalizations */ + public enum FieldsbetaAppLocalizations: String, Codable, Equatable, CaseIterable { + case app = "app" + case description = "description" + case feedbackEmail = "feedbackEmail" + case locale = "locale" + case marketingUrl = "marketingUrl" + case privacyPolicyUrl = "privacyPolicyUrl" + case tvOsPrivacyPolicy = "tvOsPrivacyPolicy" + } + + /** the fields to include for returned resources of type betaLicenseAgreements */ + public enum FieldsbetaLicenseAgreements: String, Codable, Equatable, CaseIterable { + case agreementText = "agreementText" + case app = "app" + } + + /** the fields to include for returned resources of type endUserLicenseAgreements */ + public enum FieldsendUserLicenseAgreements: String, Codable, Equatable, CaseIterable { + case agreementText = "agreementText" + case app = "app" + case territories = "territories" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'appStoreVersions.appStoreState' */ + public var filterappStoreVersionsAppStoreState: [FilterappStoreVersionsAppStoreState]? + + /** filter by attribute 'appStoreVersions.platform' */ + public var filterappStoreVersionsPlatform: [FilterappStoreVersionsPlatform]? + + /** filter by attribute 'bundleId' */ + public var filterbundleId: [String]? + + /** filter by attribute 'name' */ + public var filtername: [String]? + + /** filter by attribute 'sku' */ + public var filtersku: [String]? + + /** filter by id(s) of related 'appStoreVersions' */ + public var filterappStoreVersions: [String]? + + /** filter by id(s) */ + public var filterid: [String]? + + /** filter by existence or non-existence of related 'gameCenterEnabledVersions' */ + public var existsgameCenterEnabledVersions: [String]? + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public var sort: [Sort]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type betaGroups */ + public var fieldsbetaGroups: [FieldsbetaGroups]? + + /** the fields to include for returned resources of type perfPowerMetrics */ + public var fieldsperfPowerMetrics: [FieldsperfPowerMetrics]? + + /** the fields to include for returned resources of type appInfos */ + public var fieldsappInfos: [FieldsappInfos]? + + /** the fields to include for returned resources of type appPreOrders */ + public var fieldsappPreOrders: [FieldsappPreOrders]? + + /** the fields to include for returned resources of type preReleaseVersions */ + public var fieldspreReleaseVersions: [FieldspreReleaseVersions]? + + /** the fields to include for returned resources of type appPrices */ + public var fieldsappPrices: [FieldsappPrices]? + + /** the fields to include for returned resources of type inAppPurchases */ + public var fieldsinAppPurchases: [FieldsinAppPurchases]? + + /** the fields to include for returned resources of type betaAppReviewDetails */ + public var fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? + + /** the fields to include for returned resources of type territories */ + public var fieldsterritories: [Fieldsterritories]? + + /** the fields to include for returned resources of type gameCenterEnabledVersions */ + public var fieldsgameCenterEnabledVersions: [FieldsgameCenterEnabledVersions]? + + /** the fields to include for returned resources of type appStoreVersions */ + public var fieldsappStoreVersions: [FieldsappStoreVersions]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** the fields to include for returned resources of type betaAppLocalizations */ + public var fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? + + /** the fields to include for returned resources of type betaLicenseAgreements */ + public var fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? + + /** the fields to include for returned resources of type endUserLicenseAgreements */ + public var fieldsendUserLicenseAgreements: [FieldsendUserLicenseAgreements]? + + /** maximum number of related appInfos returned (when they are included) */ + public var limitappInfos: Int? + + /** maximum number of related appStoreVersions returned (when they are included) */ + public var limitappStoreVersions: Int? + + /** maximum number of related availableTerritories returned (when they are included) */ + public var limitavailableTerritories: Int? + + /** maximum number of related betaAppLocalizations returned (when they are included) */ + public var limitbetaAppLocalizations: Int? + + /** maximum number of related betaGroups returned (when they are included) */ + public var limitbetaGroups: Int? + + /** maximum number of related builds returned (when they are included) */ + public var limitbuilds: Int? + + /** maximum number of related gameCenterEnabledVersions returned (when they are included) */ + public var limitgameCenterEnabledVersions: Int? + + /** maximum number of related inAppPurchases returned (when they are included) */ + public var limitinAppPurchases: Int? + + /** maximum number of related preReleaseVersions returned (when they are included) */ + public var limitpreReleaseVersions: Int? + + /** maximum number of related prices returned (when they are included) */ + public var limitprices: Int? + + public init(filterappStoreVersionsAppStoreState: [FilterappStoreVersionsAppStoreState]? = nil, filterappStoreVersionsPlatform: [FilterappStoreVersionsPlatform]? = nil, filterbundleId: [String]? = nil, filtername: [String]? = nil, filtersku: [String]? = nil, filterappStoreVersions: [String]? = nil, filterid: [String]? = nil, existsgameCenterEnabledVersions: [String]? = nil, sort: [Sort]? = nil, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbetaGroups: [FieldsbetaGroups]? = nil, fieldsperfPowerMetrics: [FieldsperfPowerMetrics]? = nil, fieldsappInfos: [FieldsappInfos]? = nil, fieldsappPreOrders: [FieldsappPreOrders]? = nil, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil, fieldsappPrices: [FieldsappPrices]? = nil, fieldsinAppPurchases: [FieldsinAppPurchases]? = nil, fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? = nil, fieldsterritories: [Fieldsterritories]? = nil, fieldsgameCenterEnabledVersions: [FieldsgameCenterEnabledVersions]? = nil, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? = nil, fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? = nil, fieldsendUserLicenseAgreements: [FieldsendUserLicenseAgreements]? = nil, limitappInfos: Int? = nil, limitappStoreVersions: Int? = nil, limitavailableTerritories: Int? = nil, limitbetaAppLocalizations: Int? = nil, limitbetaGroups: Int? = nil, limitbuilds: Int? = nil, limitgameCenterEnabledVersions: Int? = nil, limitinAppPurchases: Int? = nil, limitpreReleaseVersions: Int? = nil, limitprices: Int? = nil) { + self.filterappStoreVersionsAppStoreState = filterappStoreVersionsAppStoreState + self.filterappStoreVersionsPlatform = filterappStoreVersionsPlatform + self.filterbundleId = filterbundleId + self.filtername = filtername + self.filtersku = filtersku + self.filterappStoreVersions = filterappStoreVersions + self.filterid = filterid + self.existsgameCenterEnabledVersions = existsgameCenterEnabledVersions + self.sort = sort + self.fieldsapps = fieldsapps + self.limit = limit + self.include = include + self.fieldsbetaGroups = fieldsbetaGroups + self.fieldsperfPowerMetrics = fieldsperfPowerMetrics + self.fieldsappInfos = fieldsappInfos + self.fieldsappPreOrders = fieldsappPreOrders + self.fieldspreReleaseVersions = fieldspreReleaseVersions + self.fieldsappPrices = fieldsappPrices + self.fieldsinAppPurchases = fieldsinAppPurchases + self.fieldsbetaAppReviewDetails = fieldsbetaAppReviewDetails + self.fieldsterritories = fieldsterritories + self.fieldsgameCenterEnabledVersions = fieldsgameCenterEnabledVersions + self.fieldsappStoreVersions = fieldsappStoreVersions + self.fieldsbuilds = fieldsbuilds + self.fieldsbetaAppLocalizations = fieldsbetaAppLocalizations + self.fieldsbetaLicenseAgreements = fieldsbetaLicenseAgreements + self.fieldsendUserLicenseAgreements = fieldsendUserLicenseAgreements + self.limitappInfos = limitappInfos + self.limitappStoreVersions = limitappStoreVersions + self.limitavailableTerritories = limitavailableTerritories + self.limitbetaAppLocalizations = limitbetaAppLocalizations + self.limitbetaGroups = limitbetaGroups + self.limitbuilds = limitbuilds + self.limitgameCenterEnabledVersions = limitgameCenterEnabledVersions + self.limitinAppPurchases = limitinAppPurchases + self.limitpreReleaseVersions = limitpreReleaseVersions + self.limitprices = limitprices + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterappStoreVersionsAppStoreState: [FilterappStoreVersionsAppStoreState]? = nil, filterappStoreVersionsPlatform: [FilterappStoreVersionsPlatform]? = nil, filterbundleId: [String]? = nil, filtername: [String]? = nil, filtersku: [String]? = nil, filterappStoreVersions: [String]? = nil, filterid: [String]? = nil, existsgameCenterEnabledVersions: [String]? = nil, sort: [Sort]? = nil, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbetaGroups: [FieldsbetaGroups]? = nil, fieldsperfPowerMetrics: [FieldsperfPowerMetrics]? = nil, fieldsappInfos: [FieldsappInfos]? = nil, fieldsappPreOrders: [FieldsappPreOrders]? = nil, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil, fieldsappPrices: [FieldsappPrices]? = nil, fieldsinAppPurchases: [FieldsinAppPurchases]? = nil, fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? = nil, fieldsterritories: [Fieldsterritories]? = nil, fieldsgameCenterEnabledVersions: [FieldsgameCenterEnabledVersions]? = nil, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? = nil, fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? = nil, fieldsendUserLicenseAgreements: [FieldsendUserLicenseAgreements]? = nil, limitappInfos: Int? = nil, limitappStoreVersions: Int? = nil, limitavailableTerritories: Int? = nil, limitbetaAppLocalizations: Int? = nil, limitbetaGroups: Int? = nil, limitbuilds: Int? = nil, limitgameCenterEnabledVersions: Int? = nil, limitinAppPurchases: Int? = nil, limitpreReleaseVersions: Int? = nil, limitprices: Int? = nil) { + let options = Options(filterappStoreVersionsAppStoreState: filterappStoreVersionsAppStoreState, filterappStoreVersionsPlatform: filterappStoreVersionsPlatform, filterbundleId: filterbundleId, filtername: filtername, filtersku: filtersku, filterappStoreVersions: filterappStoreVersions, filterid: filterid, existsgameCenterEnabledVersions: existsgameCenterEnabledVersions, sort: sort, fieldsapps: fieldsapps, limit: limit, include: include, fieldsbetaGroups: fieldsbetaGroups, fieldsperfPowerMetrics: fieldsperfPowerMetrics, fieldsappInfos: fieldsappInfos, fieldsappPreOrders: fieldsappPreOrders, fieldspreReleaseVersions: fieldspreReleaseVersions, fieldsappPrices: fieldsappPrices, fieldsinAppPurchases: fieldsinAppPurchases, fieldsbetaAppReviewDetails: fieldsbetaAppReviewDetails, fieldsterritories: fieldsterritories, fieldsgameCenterEnabledVersions: fieldsgameCenterEnabledVersions, fieldsappStoreVersions: fieldsappStoreVersions, fieldsbuilds: fieldsbuilds, fieldsbetaAppLocalizations: fieldsbetaAppLocalizations, fieldsbetaLicenseAgreements: fieldsbetaLicenseAgreements, fieldsendUserLicenseAgreements: fieldsendUserLicenseAgreements, limitappInfos: limitappInfos, limitappStoreVersions: limitappStoreVersions, limitavailableTerritories: limitavailableTerritories, limitbetaAppLocalizations: limitbetaAppLocalizations, limitbetaGroups: limitbetaGroups, limitbuilds: limitbuilds, limitgameCenterEnabledVersions: limitgameCenterEnabledVersions, limitinAppPurchases: limitinAppPurchases, limitpreReleaseVersions: limitpreReleaseVersions, limitprices: limitprices) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterappStoreVersionsAppStoreState = options.filterappStoreVersionsAppStoreState?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[appStoreVersions.appStoreState]"] = filterappStoreVersionsAppStoreState + } + if let filterappStoreVersionsPlatform = options.filterappStoreVersionsPlatform?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[appStoreVersions.platform]"] = filterappStoreVersionsPlatform + } + if let filterbundleId = options.filterbundleId?.joined(separator: ",") { + params["filter[bundleId]"] = filterbundleId + } + if let filtername = options.filtername?.joined(separator: ",") { + params["filter[name]"] = filtername + } + if let filtersku = options.filtersku?.joined(separator: ",") { + params["filter[sku]"] = filtersku + } + if let filterappStoreVersions = options.filterappStoreVersions?.joined(separator: ",") { + params["filter[appStoreVersions]"] = filterappStoreVersions + } + if let filterid = options.filterid?.joined(separator: ",") { + params["filter[id]"] = filterid + } + if let existsgameCenterEnabledVersions = options.existsgameCenterEnabledVersions?.joined(separator: ",") { + params["exists[gameCenterEnabledVersions]"] = existsgameCenterEnabledVersions + } + if let sort = options.sort?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["sort"] = sort + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbetaGroups = options.fieldsbetaGroups?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaGroups]"] = fieldsbetaGroups + } + if let fieldsperfPowerMetrics = options.fieldsperfPowerMetrics?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[perfPowerMetrics]"] = fieldsperfPowerMetrics + } + if let fieldsappInfos = options.fieldsappInfos?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appInfos]"] = fieldsappInfos + } + if let fieldsappPreOrders = options.fieldsappPreOrders?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPreOrders]"] = fieldsappPreOrders + } + if let fieldspreReleaseVersions = options.fieldspreReleaseVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[preReleaseVersions]"] = fieldspreReleaseVersions + } + if let fieldsappPrices = options.fieldsappPrices?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPrices]"] = fieldsappPrices + } + if let fieldsinAppPurchases = options.fieldsinAppPurchases?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[inAppPurchases]"] = fieldsinAppPurchases + } + if let fieldsbetaAppReviewDetails = options.fieldsbetaAppReviewDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppReviewDetails]"] = fieldsbetaAppReviewDetails + } + if let fieldsterritories = options.fieldsterritories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[territories]"] = fieldsterritories + } + if let fieldsgameCenterEnabledVersions = options.fieldsgameCenterEnabledVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[gameCenterEnabledVersions]"] = fieldsgameCenterEnabledVersions + } + if let fieldsappStoreVersions = options.fieldsappStoreVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersions]"] = fieldsappStoreVersions + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let fieldsbetaAppLocalizations = options.fieldsbetaAppLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppLocalizations]"] = fieldsbetaAppLocalizations + } + if let fieldsbetaLicenseAgreements = options.fieldsbetaLicenseAgreements?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaLicenseAgreements]"] = fieldsbetaLicenseAgreements + } + if let fieldsendUserLicenseAgreements = options.fieldsendUserLicenseAgreements?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[endUserLicenseAgreements]"] = fieldsendUserLicenseAgreements + } + if let limitappInfos = options.limitappInfos { + params["limit[appInfos]"] = limitappInfos + } + if let limitappStoreVersions = options.limitappStoreVersions { + params["limit[appStoreVersions]"] = limitappStoreVersions + } + if let limitavailableTerritories = options.limitavailableTerritories { + params["limit[availableTerritories]"] = limitavailableTerritories + } + if let limitbetaAppLocalizations = options.limitbetaAppLocalizations { + params["limit[betaAppLocalizations]"] = limitbetaAppLocalizations + } + if let limitbetaGroups = options.limitbetaGroups { + params["limit[betaGroups]"] = limitbetaGroups + } + if let limitbuilds = options.limitbuilds { + params["limit[builds]"] = limitbuilds + } + if let limitgameCenterEnabledVersions = options.limitgameCenterEnabledVersions { + params["limit[gameCenterEnabledVersions]"] = limitgameCenterEnabledVersions + } + if let limitinAppPurchases = options.limitinAppPurchases { + params["limit[inAppPurchases]"] = limitinAppPurchases + } + if let limitpreReleaseVersions = options.limitpreReleaseVersions { + params["limit[preReleaseVersions]"] = limitpreReleaseVersions + } + if let limitprices = options.limitprices { + params["limit[prices]"] = limitprices + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppsResponse + + /** List of Apps */ + case status200(AppsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: AppsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGetInstance.swift new file mode 100644 index 000000000..5be2611c6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGetInstance.swift @@ -0,0 +1,542 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsGetInstance { + + public static let service = APIService(id: "apps-get_instance", tag: "Apps", method: "GET", path: "/v1/apps/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case builds = "builds" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + } + + /** the fields to include for returned resources of type betaGroups */ + public enum FieldsbetaGroups: String, Codable, Equatable, CaseIterable { + case app = "app" + case betaTesters = "betaTesters" + case builds = "builds" + case createdDate = "createdDate" + case feedbackEnabled = "feedbackEnabled" + case isInternalGroup = "isInternalGroup" + case name = "name" + case publicLink = "publicLink" + case publicLinkEnabled = "publicLinkEnabled" + case publicLinkId = "publicLinkId" + case publicLinkLimit = "publicLinkLimit" + case publicLinkLimitEnabled = "publicLinkLimitEnabled" + } + + /** the fields to include for returned resources of type perfPowerMetrics */ + public enum FieldsperfPowerMetrics: String, Codable, Equatable, CaseIterable { + case deviceType = "deviceType" + case metricType = "metricType" + case platform = "platform" + } + + /** the fields to include for returned resources of type appInfos */ + public enum FieldsappInfos: String, Codable, Equatable, CaseIterable { + case app = "app" + case appInfoLocalizations = "appInfoLocalizations" + case appStoreAgeRating = "appStoreAgeRating" + case appStoreState = "appStoreState" + case brazilAgeRating = "brazilAgeRating" + case kidsAgeBand = "kidsAgeBand" + case primaryCategory = "primaryCategory" + case primarySubcategoryOne = "primarySubcategoryOne" + case primarySubcategoryTwo = "primarySubcategoryTwo" + case secondaryCategory = "secondaryCategory" + case secondarySubcategoryOne = "secondarySubcategoryOne" + case secondarySubcategoryTwo = "secondarySubcategoryTwo" + } + + /** the fields to include for returned resources of type appPreOrders */ + public enum FieldsappPreOrders: String, Codable, Equatable, CaseIterable { + case app = "app" + case appReleaseDate = "appReleaseDate" + case preOrderAvailableDate = "preOrderAvailableDate" + } + + /** the fields to include for returned resources of type preReleaseVersions */ + public enum FieldspreReleaseVersions: String, Codable, Equatable, CaseIterable { + case app = "app" + case builds = "builds" + case platform = "platform" + case version = "version" + } + + /** the fields to include for returned resources of type appPrices */ + public enum FieldsappPrices: String, Codable, Equatable, CaseIterable { + case app = "app" + case priceTier = "priceTier" + } + + /** the fields to include for returned resources of type inAppPurchases */ + public enum FieldsinAppPurchases: String, Codable, Equatable, CaseIterable { + case apps = "apps" + case inAppPurchaseType = "inAppPurchaseType" + case productId = "productId" + case referenceName = "referenceName" + case state = "state" + } + + /** the fields to include for returned resources of type betaAppReviewDetails */ + public enum FieldsbetaAppReviewDetails: String, Codable, Equatable, CaseIterable { + case app = "app" + case contactEmail = "contactEmail" + case contactFirstName = "contactFirstName" + case contactLastName = "contactLastName" + case contactPhone = "contactPhone" + case demoAccountName = "demoAccountName" + case demoAccountPassword = "demoAccountPassword" + case demoAccountRequired = "demoAccountRequired" + case notes = "notes" + } + + /** the fields to include for returned resources of type territories */ + public enum Fieldsterritories: String, Codable, Equatable, CaseIterable { + case currency = "currency" + } + + /** the fields to include for returned resources of type gameCenterEnabledVersions */ + public enum FieldsgameCenterEnabledVersions: String, Codable, Equatable, CaseIterable { + case app = "app" + case compatibleVersions = "compatibleVersions" + case iconAsset = "iconAsset" + case platform = "platform" + case versionString = "versionString" + } + + /** the fields to include for returned resources of type appStoreVersions */ + public enum FieldsappStoreVersions: String, Codable, Equatable, CaseIterable { + case ageRatingDeclaration = "ageRatingDeclaration" + case app = "app" + case appStoreReviewDetail = "appStoreReviewDetail" + case appStoreState = "appStoreState" + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + case appStoreVersionPhasedRelease = "appStoreVersionPhasedRelease" + case appStoreVersionSubmission = "appStoreVersionSubmission" + case build = "build" + case copyright = "copyright" + case createdDate = "createdDate" + case downloadable = "downloadable" + case earliestReleaseDate = "earliestReleaseDate" + case idfaDeclaration = "idfaDeclaration" + case platform = "platform" + case releaseType = "releaseType" + case routingAppCoverage = "routingAppCoverage" + case usesIdfa = "usesIdfa" + case versionString = "versionString" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + /** the fields to include for returned resources of type betaAppLocalizations */ + public enum FieldsbetaAppLocalizations: String, Codable, Equatable, CaseIterable { + case app = "app" + case description = "description" + case feedbackEmail = "feedbackEmail" + case locale = "locale" + case marketingUrl = "marketingUrl" + case privacyPolicyUrl = "privacyPolicyUrl" + case tvOsPrivacyPolicy = "tvOsPrivacyPolicy" + } + + /** the fields to include for returned resources of type betaLicenseAgreements */ + public enum FieldsbetaLicenseAgreements: String, Codable, Equatable, CaseIterable { + case agreementText = "agreementText" + case app = "app" + } + + /** the fields to include for returned resources of type endUserLicenseAgreements */ + public enum FieldsendUserLicenseAgreements: String, Codable, Equatable, CaseIterable { + case agreementText = "agreementText" + case app = "app" + case territories = "territories" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type betaGroups */ + public var fieldsbetaGroups: [FieldsbetaGroups]? + + /** the fields to include for returned resources of type perfPowerMetrics */ + public var fieldsperfPowerMetrics: [FieldsperfPowerMetrics]? + + /** the fields to include for returned resources of type appInfos */ + public var fieldsappInfos: [FieldsappInfos]? + + /** the fields to include for returned resources of type appPreOrders */ + public var fieldsappPreOrders: [FieldsappPreOrders]? + + /** the fields to include for returned resources of type preReleaseVersions */ + public var fieldspreReleaseVersions: [FieldspreReleaseVersions]? + + /** the fields to include for returned resources of type appPrices */ + public var fieldsappPrices: [FieldsappPrices]? + + /** the fields to include for returned resources of type inAppPurchases */ + public var fieldsinAppPurchases: [FieldsinAppPurchases]? + + /** the fields to include for returned resources of type betaAppReviewDetails */ + public var fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? + + /** the fields to include for returned resources of type territories */ + public var fieldsterritories: [Fieldsterritories]? + + /** the fields to include for returned resources of type gameCenterEnabledVersions */ + public var fieldsgameCenterEnabledVersions: [FieldsgameCenterEnabledVersions]? + + /** the fields to include for returned resources of type appStoreVersions */ + public var fieldsappStoreVersions: [FieldsappStoreVersions]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** the fields to include for returned resources of type betaAppLocalizations */ + public var fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? + + /** the fields to include for returned resources of type betaLicenseAgreements */ + public var fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? + + /** the fields to include for returned resources of type endUserLicenseAgreements */ + public var fieldsendUserLicenseAgreements: [FieldsendUserLicenseAgreements]? + + /** maximum number of related appInfos returned (when they are included) */ + public var limitappInfos: Int? + + /** maximum number of related appStoreVersions returned (when they are included) */ + public var limitappStoreVersions: Int? + + /** maximum number of related availableTerritories returned (when they are included) */ + public var limitavailableTerritories: Int? + + /** maximum number of related betaAppLocalizations returned (when they are included) */ + public var limitbetaAppLocalizations: Int? + + /** maximum number of related betaGroups returned (when they are included) */ + public var limitbetaGroups: Int? + + /** maximum number of related builds returned (when they are included) */ + public var limitbuilds: Int? + + /** maximum number of related gameCenterEnabledVersions returned (when they are included) */ + public var limitgameCenterEnabledVersions: Int? + + /** maximum number of related inAppPurchases returned (when they are included) */ + public var limitinAppPurchases: Int? + + /** maximum number of related preReleaseVersions returned (when they are included) */ + public var limitpreReleaseVersions: Int? + + /** maximum number of related prices returned (when they are included) */ + public var limitprices: Int? + + public init(id: String, fieldsapps: [Fieldsapps]? = nil, include: [Include]? = nil, fieldsbetaGroups: [FieldsbetaGroups]? = nil, fieldsperfPowerMetrics: [FieldsperfPowerMetrics]? = nil, fieldsappInfos: [FieldsappInfos]? = nil, fieldsappPreOrders: [FieldsappPreOrders]? = nil, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil, fieldsappPrices: [FieldsappPrices]? = nil, fieldsinAppPurchases: [FieldsinAppPurchases]? = nil, fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? = nil, fieldsterritories: [Fieldsterritories]? = nil, fieldsgameCenterEnabledVersions: [FieldsgameCenterEnabledVersions]? = nil, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? = nil, fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? = nil, fieldsendUserLicenseAgreements: [FieldsendUserLicenseAgreements]? = nil, limitappInfos: Int? = nil, limitappStoreVersions: Int? = nil, limitavailableTerritories: Int? = nil, limitbetaAppLocalizations: Int? = nil, limitbetaGroups: Int? = nil, limitbuilds: Int? = nil, limitgameCenterEnabledVersions: Int? = nil, limitinAppPurchases: Int? = nil, limitpreReleaseVersions: Int? = nil, limitprices: Int? = nil) { + self.id = id + self.fieldsapps = fieldsapps + self.include = include + self.fieldsbetaGroups = fieldsbetaGroups + self.fieldsperfPowerMetrics = fieldsperfPowerMetrics + self.fieldsappInfos = fieldsappInfos + self.fieldsappPreOrders = fieldsappPreOrders + self.fieldspreReleaseVersions = fieldspreReleaseVersions + self.fieldsappPrices = fieldsappPrices + self.fieldsinAppPurchases = fieldsinAppPurchases + self.fieldsbetaAppReviewDetails = fieldsbetaAppReviewDetails + self.fieldsterritories = fieldsterritories + self.fieldsgameCenterEnabledVersions = fieldsgameCenterEnabledVersions + self.fieldsappStoreVersions = fieldsappStoreVersions + self.fieldsbuilds = fieldsbuilds + self.fieldsbetaAppLocalizations = fieldsbetaAppLocalizations + self.fieldsbetaLicenseAgreements = fieldsbetaLicenseAgreements + self.fieldsendUserLicenseAgreements = fieldsendUserLicenseAgreements + self.limitappInfos = limitappInfos + self.limitappStoreVersions = limitappStoreVersions + self.limitavailableTerritories = limitavailableTerritories + self.limitbetaAppLocalizations = limitbetaAppLocalizations + self.limitbetaGroups = limitbetaGroups + self.limitbuilds = limitbuilds + self.limitgameCenterEnabledVersions = limitgameCenterEnabledVersions + self.limitinAppPurchases = limitinAppPurchases + self.limitpreReleaseVersions = limitpreReleaseVersions + self.limitprices = limitprices + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsapps: [Fieldsapps]? = nil, include: [Include]? = nil, fieldsbetaGroups: [FieldsbetaGroups]? = nil, fieldsperfPowerMetrics: [FieldsperfPowerMetrics]? = nil, fieldsappInfos: [FieldsappInfos]? = nil, fieldsappPreOrders: [FieldsappPreOrders]? = nil, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil, fieldsappPrices: [FieldsappPrices]? = nil, fieldsinAppPurchases: [FieldsinAppPurchases]? = nil, fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? = nil, fieldsterritories: [Fieldsterritories]? = nil, fieldsgameCenterEnabledVersions: [FieldsgameCenterEnabledVersions]? = nil, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? = nil, fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? = nil, fieldsendUserLicenseAgreements: [FieldsendUserLicenseAgreements]? = nil, limitappInfos: Int? = nil, limitappStoreVersions: Int? = nil, limitavailableTerritories: Int? = nil, limitbetaAppLocalizations: Int? = nil, limitbetaGroups: Int? = nil, limitbuilds: Int? = nil, limitgameCenterEnabledVersions: Int? = nil, limitinAppPurchases: Int? = nil, limitpreReleaseVersions: Int? = nil, limitprices: Int? = nil) { + let options = Options(id: id, fieldsapps: fieldsapps, include: include, fieldsbetaGroups: fieldsbetaGroups, fieldsperfPowerMetrics: fieldsperfPowerMetrics, fieldsappInfos: fieldsappInfos, fieldsappPreOrders: fieldsappPreOrders, fieldspreReleaseVersions: fieldspreReleaseVersions, fieldsappPrices: fieldsappPrices, fieldsinAppPurchases: fieldsinAppPurchases, fieldsbetaAppReviewDetails: fieldsbetaAppReviewDetails, fieldsterritories: fieldsterritories, fieldsgameCenterEnabledVersions: fieldsgameCenterEnabledVersions, fieldsappStoreVersions: fieldsappStoreVersions, fieldsbuilds: fieldsbuilds, fieldsbetaAppLocalizations: fieldsbetaAppLocalizations, fieldsbetaLicenseAgreements: fieldsbetaLicenseAgreements, fieldsendUserLicenseAgreements: fieldsendUserLicenseAgreements, limitappInfos: limitappInfos, limitappStoreVersions: limitappStoreVersions, limitavailableTerritories: limitavailableTerritories, limitbetaAppLocalizations: limitbetaAppLocalizations, limitbetaGroups: limitbetaGroups, limitbuilds: limitbuilds, limitgameCenterEnabledVersions: limitgameCenterEnabledVersions, limitinAppPurchases: limitinAppPurchases, limitpreReleaseVersions: limitpreReleaseVersions, limitprices: limitprices) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbetaGroups = options.fieldsbetaGroups?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaGroups]"] = fieldsbetaGroups + } + if let fieldsperfPowerMetrics = options.fieldsperfPowerMetrics?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[perfPowerMetrics]"] = fieldsperfPowerMetrics + } + if let fieldsappInfos = options.fieldsappInfos?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appInfos]"] = fieldsappInfos + } + if let fieldsappPreOrders = options.fieldsappPreOrders?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPreOrders]"] = fieldsappPreOrders + } + if let fieldspreReleaseVersions = options.fieldspreReleaseVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[preReleaseVersions]"] = fieldspreReleaseVersions + } + if let fieldsappPrices = options.fieldsappPrices?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPrices]"] = fieldsappPrices + } + if let fieldsinAppPurchases = options.fieldsinAppPurchases?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[inAppPurchases]"] = fieldsinAppPurchases + } + if let fieldsbetaAppReviewDetails = options.fieldsbetaAppReviewDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppReviewDetails]"] = fieldsbetaAppReviewDetails + } + if let fieldsterritories = options.fieldsterritories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[territories]"] = fieldsterritories + } + if let fieldsgameCenterEnabledVersions = options.fieldsgameCenterEnabledVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[gameCenterEnabledVersions]"] = fieldsgameCenterEnabledVersions + } + if let fieldsappStoreVersions = options.fieldsappStoreVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersions]"] = fieldsappStoreVersions + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let fieldsbetaAppLocalizations = options.fieldsbetaAppLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppLocalizations]"] = fieldsbetaAppLocalizations + } + if let fieldsbetaLicenseAgreements = options.fieldsbetaLicenseAgreements?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaLicenseAgreements]"] = fieldsbetaLicenseAgreements + } + if let fieldsendUserLicenseAgreements = options.fieldsendUserLicenseAgreements?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[endUserLicenseAgreements]"] = fieldsendUserLicenseAgreements + } + if let limitappInfos = options.limitappInfos { + params["limit[appInfos]"] = limitappInfos + } + if let limitappStoreVersions = options.limitappStoreVersions { + params["limit[appStoreVersions]"] = limitappStoreVersions + } + if let limitavailableTerritories = options.limitavailableTerritories { + params["limit[availableTerritories]"] = limitavailableTerritories + } + if let limitbetaAppLocalizations = options.limitbetaAppLocalizations { + params["limit[betaAppLocalizations]"] = limitbetaAppLocalizations + } + if let limitbetaGroups = options.limitbetaGroups { + params["limit[betaGroups]"] = limitbetaGroups + } + if let limitbuilds = options.limitbuilds { + params["limit[builds]"] = limitbuilds + } + if let limitgameCenterEnabledVersions = options.limitgameCenterEnabledVersions { + params["limit[gameCenterEnabledVersions]"] = limitgameCenterEnabledVersions + } + if let limitinAppPurchases = options.limitinAppPurchases { + params["limit[inAppPurchases]"] = limitinAppPurchases + } + if let limitpreReleaseVersions = options.limitpreReleaseVersions { + params["limit[preReleaseVersions]"] = limitpreReleaseVersions + } + if let limitprices = options.limitprices { + params["limit[prices]"] = limitprices + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppResponse + + /** Single App */ + case status200(AppResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsInAppPurchasesGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsInAppPurchasesGetToManyRelated.swift new file mode 100644 index 000000000..4fcd5dad9 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsInAppPurchasesGetToManyRelated.swift @@ -0,0 +1,251 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsInAppPurchasesGetToManyRelated { + + public static let service = APIService(id: "apps-inAppPurchases-get_to_many_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/inAppPurchases", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'inAppPurchaseType' */ + public enum FilterinAppPurchaseType: String, Codable, Equatable, CaseIterable { + case automaticallyRenewableSubscription = "AUTOMATICALLY_RENEWABLE_SUBSCRIPTION" + case nonConsumable = "NON_CONSUMABLE" + case consumable = "CONSUMABLE" + case nonRenewingSubscription = "NON_RENEWING_SUBSCRIPTION" + case freeSubscription = "FREE_SUBSCRIPTION" + } + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public enum Sort: String, Codable, Equatable, CaseIterable { + case inAppPurchaseType = "inAppPurchaseType" + case inAppPurchaseType = "-inAppPurchaseType" + case productId = "productId" + case productId = "-productId" + case referenceName = "referenceName" + case referenceName = "-referenceName" + } + + /** the fields to include for returned resources of type inAppPurchases */ + public enum FieldsinAppPurchases: String, Codable, Equatable, CaseIterable { + case apps = "apps" + case inAppPurchaseType = "inAppPurchaseType" + case productId = "productId" + case referenceName = "referenceName" + case state = "state" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** filter by attribute 'inAppPurchaseType' */ + public var filterinAppPurchaseType: [FilterinAppPurchaseType]? + + /** filter by canBeSubmitted */ + public var filtercanBeSubmitted: [String]? + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public var sort: [Sort]? + + /** the fields to include for returned resources of type inAppPurchases */ + public var fieldsinAppPurchases: [FieldsinAppPurchases]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, filterinAppPurchaseType: [FilterinAppPurchaseType]? = nil, filtercanBeSubmitted: [String]? = nil, sort: [Sort]? = nil, fieldsinAppPurchases: [FieldsinAppPurchases]? = nil, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil, include: [Include]? = nil) { + self.id = id + self.filterinAppPurchaseType = filterinAppPurchaseType + self.filtercanBeSubmitted = filtercanBeSubmitted + self.sort = sort + self.fieldsinAppPurchases = fieldsinAppPurchases + self.fieldsapps = fieldsapps + self.limit = limit + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsInAppPurchasesGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, filterinAppPurchaseType: [FilterinAppPurchaseType]? = nil, filtercanBeSubmitted: [String]? = nil, sort: [Sort]? = nil, fieldsinAppPurchases: [FieldsinAppPurchases]? = nil, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil, include: [Include]? = nil) { + let options = Options(id: id, filterinAppPurchaseType: filterinAppPurchaseType, filtercanBeSubmitted: filtercanBeSubmitted, sort: sort, fieldsinAppPurchases: fieldsinAppPurchases, fieldsapps: fieldsapps, limit: limit, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterinAppPurchaseType = options.filterinAppPurchaseType?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[inAppPurchaseType]"] = filterinAppPurchaseType + } + if let filtercanBeSubmitted = options.filtercanBeSubmitted?.joined(separator: ",") { + params["filter[canBeSubmitted]"] = filtercanBeSubmitted + } + if let sort = options.sort?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["sort"] = sort + } + if let fieldsinAppPurchases = options.fieldsinAppPurchases?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[inAppPurchases]"] = fieldsinAppPurchases + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = InAppPurchasesResponse + + /** List of related resources */ + case status200(InAppPurchasesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: InAppPurchasesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(InAppPurchasesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPerfPowerMetricsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPerfPowerMetricsGetToManyRelated.swift new file mode 100644 index 000000000..6dc112a2b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPerfPowerMetricsGetToManyRelated.swift @@ -0,0 +1,178 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsPerfPowerMetricsGetToManyRelated { + + public static let service = APIService(id: "apps-perfPowerMetrics-get_to_many_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/perfPowerMetrics", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'metricType' */ + public enum FiltermetricType: String, Codable, Equatable, CaseIterable { + case disk = "DISK" + case hang = "HANG" + case battery = "BATTERY" + case launch = "LAUNCH" + case memory = "MEMORY" + case animation = "ANIMATION" + } + + /** filter by attribute 'platform' */ + public enum Filterplatform: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** filter by attribute 'deviceType' */ + public var filterdeviceType: [String]? + + /** filter by attribute 'metricType' */ + public var filtermetricType: [FiltermetricType]? + + /** filter by attribute 'platform' */ + public var filterplatform: [Filterplatform]? + + public init(id: String, filterdeviceType: [String]? = nil, filtermetricType: [FiltermetricType]? = nil, filterplatform: [Filterplatform]? = nil) { + self.id = id + self.filterdeviceType = filterdeviceType + self.filtermetricType = filtermetricType + self.filterplatform = filterplatform + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsPerfPowerMetricsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, filterdeviceType: [String]? = nil, filtermetricType: [FiltermetricType]? = nil, filterplatform: [Filterplatform]? = nil) { + let options = Options(id: id, filterdeviceType: filterdeviceType, filtermetricType: filtermetricType, filterplatform: filterplatform) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterdeviceType = options.filterdeviceType?.joined(separator: ",") { + params["filter[deviceType]"] = filterdeviceType + } + if let filtermetricType = options.filtermetricType?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[metricType]"] = filtermetricType + } + if let filterplatform = options.filterplatform?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[platform]"] = filterplatform + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = PerfPowerMetricsResponse + + /** List of related resources */ + case status200(PerfPowerMetricsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: PerfPowerMetricsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(PerfPowerMetricsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPreOrderGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPreOrderGetToOneRelated.swift new file mode 100644 index 000000000..b8fa5f78a --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPreOrderGetToOneRelated.swift @@ -0,0 +1,156 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsPreOrderGetToOneRelated { + + public static let service = APIService(id: "apps-preOrder-get_to_one_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/preOrder", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appPreOrders */ + public enum FieldsappPreOrders: String, Codable, Equatable, CaseIterable { + case app = "app" + case appReleaseDate = "appReleaseDate" + case preOrderAvailableDate = "preOrderAvailableDate" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appPreOrders */ + public var fieldsappPreOrders: [FieldsappPreOrders]? + + public init(id: String, fieldsappPreOrders: [FieldsappPreOrders]? = nil) { + self.id = id + self.fieldsappPreOrders = fieldsappPreOrders + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsPreOrderGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappPreOrders: [FieldsappPreOrders]? = nil) { + let options = Options(id: id, fieldsappPreOrders: fieldsappPreOrders) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappPreOrders = options.fieldsappPreOrders?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPreOrders]"] = fieldsappPreOrders + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPreOrderResponse + + /** Related resource */ + case status200(AppPreOrderResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppPreOrderResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPreOrderResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPreReleaseVersionsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPreReleaseVersionsGetToManyRelated.swift new file mode 100644 index 000000000..f95fc97be --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPreReleaseVersionsGetToManyRelated.swift @@ -0,0 +1,164 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsPreReleaseVersionsGetToManyRelated { + + public static let service = APIService(id: "apps-preReleaseVersions-get_to_many_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/preReleaseVersions", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type preReleaseVersions */ + public enum FieldspreReleaseVersions: String, Codable, Equatable, CaseIterable { + case app = "app" + case builds = "builds" + case platform = "platform" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type preReleaseVersions */ + public var fieldspreReleaseVersions: [FieldspreReleaseVersions]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil, limit: Int? = nil) { + self.id = id + self.fieldspreReleaseVersions = fieldspreReleaseVersions + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsPreReleaseVersionsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldspreReleaseVersions: fieldspreReleaseVersions, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldspreReleaseVersions = options.fieldspreReleaseVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[preReleaseVersions]"] = fieldspreReleaseVersions + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = PreReleaseVersionsResponse + + /** List of related resources */ + case status200(PreReleaseVersionsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: PreReleaseVersionsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(PreReleaseVersionsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPricesGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPricesGetToManyRelated.swift new file mode 100644 index 000000000..9f194528c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsPricesGetToManyRelated.swift @@ -0,0 +1,221 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsPricesGetToManyRelated { + + public static let service = APIService(id: "apps-prices-get_to_many_related", tag: "Apps", method: "GET", path: "/v1/apps/{id}/prices", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appPrices */ + public enum FieldsappPrices: String, Codable, Equatable, CaseIterable { + case app = "app" + case priceTier = "priceTier" + } + + /** the fields to include for returned resources of type appPriceTiers */ + public enum FieldsappPriceTiers: String, Codable, Equatable, CaseIterable { + case pricePoints = "pricePoints" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case priceTier = "priceTier" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appPrices */ + public var fieldsappPrices: [FieldsappPrices]? + + /** the fields to include for returned resources of type appPriceTiers */ + public var fieldsappPriceTiers: [FieldsappPriceTiers]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, fieldsappPrices: [FieldsappPrices]? = nil, fieldsappPriceTiers: [FieldsappPriceTiers]? = nil, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil, include: [Include]? = nil) { + self.id = id + self.fieldsappPrices = fieldsappPrices + self.fieldsappPriceTiers = fieldsappPriceTiers + self.fieldsapps = fieldsapps + self.limit = limit + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: AppsPricesGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappPrices: [FieldsappPrices]? = nil, fieldsappPriceTiers: [FieldsappPriceTiers]? = nil, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil, include: [Include]? = nil) { + let options = Options(id: id, fieldsappPrices: fieldsappPrices, fieldsappPriceTiers: fieldsappPriceTiers, fieldsapps: fieldsapps, limit: limit, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappPrices = options.fieldsappPrices?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPrices]"] = fieldsappPrices + } + if let fieldsappPriceTiers = options.fieldsappPriceTiers?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appPriceTiers]"] = fieldsappPriceTiers + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppPricesResponse + + /** List of related resources */ + case status200(AppPricesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppPricesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppPricesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsUpdateInstance.swift new file mode 100644 index 000000000..cd4261163 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Apps { + + public enum AppsUpdateInstance { + + public static let service = APIService(id: "apps-update_instance", tag: "Apps", method: "PATCH", path: "/v1/apps/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: AppUpdateRequest + + public init(body: AppUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: AppsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: AppUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppResponse + + /** Single App */ + case status200(AppResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: AppResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsAppGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsAppGetToOneRelated.swift new file mode 100644 index 000000000..3e6a15e11 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsAppGetToOneRelated.swift @@ -0,0 +1,176 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaAppLocalizations { + + public enum BetaAppLocalizationsAppGetToOneRelated { + + public static let service = APIService(id: "betaAppLocalizations-app-get_to_one_related", tag: "BetaAppLocalizations", method: "GET", path: "/v1/betaAppLocalizations/{id}/app", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(id: String, fieldsapps: [Fieldsapps]? = nil) { + self.id = id + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaAppLocalizationsAppGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(id: id, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppResponse + + /** Related resource */ + case status200(AppResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsCreateInstance.swift new file mode 100644 index 000000000..4be4f1853 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaAppLocalizations { + + public enum BetaAppLocalizationsCreateInstance { + + public static let service = APIService(id: "betaAppLocalizations-create_instance", tag: "BetaAppLocalizations", method: "POST", path: "/v1/betaAppLocalizations", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: BetaAppLocalizationCreateRequest + + public init(body: BetaAppLocalizationCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: BetaAppLocalizationsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaAppLocalizationResponse + + /** Single BetaAppLocalization */ + case status201(BetaAppLocalizationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BetaAppLocalizationResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(BetaAppLocalizationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsDeleteInstance.swift new file mode 100644 index 000000000..430b14abd --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaAppLocalizations { + + public enum BetaAppLocalizationsDeleteInstance { + + public static let service = APIService(id: "betaAppLocalizations-delete_instance", tag: "BetaAppLocalizations", method: "DELETE", path: "/v1/betaAppLocalizations/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaAppLocalizationsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsGetCollection.swift new file mode 100644 index 000000000..4cc6857ec --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsGetCollection.swift @@ -0,0 +1,211 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaAppLocalizations { + + public enum BetaAppLocalizationsGetCollection { + + public static let service = APIService(id: "betaAppLocalizations-get_collection", tag: "BetaAppLocalizations", method: "GET", path: "/v1/betaAppLocalizations", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaAppLocalizations */ + public enum FieldsbetaAppLocalizations: String, Codable, Equatable, CaseIterable { + case app = "app" + case description = "description" + case feedbackEmail = "feedbackEmail" + case locale = "locale" + case marketingUrl = "marketingUrl" + case privacyPolicyUrl = "privacyPolicyUrl" + case tvOsPrivacyPolicy = "tvOsPrivacyPolicy" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'locale' */ + public var filterlocale: [String]? + + /** filter by id(s) of related 'app' */ + public var filterapp: [String]? + + /** the fields to include for returned resources of type betaAppLocalizations */ + public var fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(filterlocale: [String]? = nil, filterapp: [String]? = nil, fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + self.filterlocale = filterlocale + self.filterapp = filterapp + self.fieldsbetaAppLocalizations = fieldsbetaAppLocalizations + self.limit = limit + self.include = include + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaAppLocalizationsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterlocale: [String]? = nil, filterapp: [String]? = nil, fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(filterlocale: filterlocale, filterapp: filterapp, fieldsbetaAppLocalizations: fieldsbetaAppLocalizations, limit: limit, include: include, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterlocale = options.filterlocale?.joined(separator: ",") { + params["filter[locale]"] = filterlocale + } + if let filterapp = options.filterapp?.joined(separator: ",") { + params["filter[app]"] = filterapp + } + if let fieldsbetaAppLocalizations = options.fieldsbetaAppLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppLocalizations]"] = fieldsbetaAppLocalizations + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaAppLocalizationsResponse + + /** List of BetaAppLocalizations */ + case status200(BetaAppLocalizationsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: BetaAppLocalizationsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaAppLocalizationsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsGetInstance.swift new file mode 100644 index 000000000..5dd8229fe --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsGetInstance.swift @@ -0,0 +1,206 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaAppLocalizations { + + public enum BetaAppLocalizationsGetInstance { + + public static let service = APIService(id: "betaAppLocalizations-get_instance", tag: "BetaAppLocalizations", method: "GET", path: "/v1/betaAppLocalizations/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaAppLocalizations */ + public enum FieldsbetaAppLocalizations: String, Codable, Equatable, CaseIterable { + case app = "app" + case description = "description" + case feedbackEmail = "feedbackEmail" + case locale = "locale" + case marketingUrl = "marketingUrl" + case privacyPolicyUrl = "privacyPolicyUrl" + case tvOsPrivacyPolicy = "tvOsPrivacyPolicy" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaAppLocalizations */ + public var fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(id: String, fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + self.id = id + self.fieldsbetaAppLocalizations = fieldsbetaAppLocalizations + self.include = include + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaAppLocalizationsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaAppLocalizations: [FieldsbetaAppLocalizations]? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(id: id, fieldsbetaAppLocalizations: fieldsbetaAppLocalizations, include: include, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaAppLocalizations = options.fieldsbetaAppLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppLocalizations]"] = fieldsbetaAppLocalizations + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaAppLocalizationResponse + + /** Single BetaAppLocalization */ + case status200(BetaAppLocalizationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaAppLocalizationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaAppLocalizationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsUpdateInstance.swift new file mode 100644 index 000000000..65e26ba52 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppLocalizations/BetaAppLocalizationsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaAppLocalizations { + + public enum BetaAppLocalizationsUpdateInstance { + + public static let service = APIService(id: "betaAppLocalizations-update_instance", tag: "BetaAppLocalizations", method: "PATCH", path: "/v1/betaAppLocalizations/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BetaAppLocalizationUpdateRequest + + public init(body: BetaAppLocalizationUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BetaAppLocalizationsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BetaAppLocalizationUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaAppLocalizationResponse + + /** Single BetaAppLocalization */ + case status200(BetaAppLocalizationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BetaAppLocalizationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaAppLocalizationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsAppGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsAppGetToOneRelated.swift new file mode 100644 index 000000000..d10b2f359 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsAppGetToOneRelated.swift @@ -0,0 +1,176 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaAppReviewDetails { + + public enum BetaAppReviewDetailsAppGetToOneRelated { + + public static let service = APIService(id: "betaAppReviewDetails-app-get_to_one_related", tag: "BetaAppReviewDetails", method: "GET", path: "/v1/betaAppReviewDetails/{id}/app", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(id: String, fieldsapps: [Fieldsapps]? = nil) { + self.id = id + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaAppReviewDetailsAppGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(id: id, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppResponse + + /** Related resource */ + case status200(AppResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsGetCollection.swift new file mode 100644 index 000000000..0d4cb9b0d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsGetCollection.swift @@ -0,0 +1,204 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaAppReviewDetails { + + public enum BetaAppReviewDetailsGetCollection { + + public static let service = APIService(id: "betaAppReviewDetails-get_collection", tag: "BetaAppReviewDetails", method: "GET", path: "/v1/betaAppReviewDetails", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaAppReviewDetails */ + public enum FieldsbetaAppReviewDetails: String, Codable, Equatable, CaseIterable { + case app = "app" + case contactEmail = "contactEmail" + case contactFirstName = "contactFirstName" + case contactLastName = "contactLastName" + case contactPhone = "contactPhone" + case demoAccountName = "demoAccountName" + case demoAccountPassword = "demoAccountPassword" + case demoAccountRequired = "demoAccountRequired" + case notes = "notes" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by id(s) of related 'app' */ + public var filterapp: [String] + + /** the fields to include for returned resources of type betaAppReviewDetails */ + public var fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(filterapp: [String], fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + self.filterapp = filterapp + self.fieldsbetaAppReviewDetails = fieldsbetaAppReviewDetails + self.limit = limit + self.include = include + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaAppReviewDetailsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterapp: [String], fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(filterapp: filterapp, fieldsbetaAppReviewDetails: fieldsbetaAppReviewDetails, limit: limit, include: include, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + params["filter[app]"] = options.filterapp.joined(separator: ",") + if let fieldsbetaAppReviewDetails = options.fieldsbetaAppReviewDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppReviewDetails]"] = fieldsbetaAppReviewDetails + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaAppReviewDetailsResponse + + /** List of BetaAppReviewDetails */ + case status200(BetaAppReviewDetailsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: BetaAppReviewDetailsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaAppReviewDetailsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsGetInstance.swift new file mode 100644 index 000000000..d679488a8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsGetInstance.swift @@ -0,0 +1,208 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaAppReviewDetails { + + public enum BetaAppReviewDetailsGetInstance { + + public static let service = APIService(id: "betaAppReviewDetails-get_instance", tag: "BetaAppReviewDetails", method: "GET", path: "/v1/betaAppReviewDetails/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaAppReviewDetails */ + public enum FieldsbetaAppReviewDetails: String, Codable, Equatable, CaseIterable { + case app = "app" + case contactEmail = "contactEmail" + case contactFirstName = "contactFirstName" + case contactLastName = "contactLastName" + case contactPhone = "contactPhone" + case demoAccountName = "demoAccountName" + case demoAccountPassword = "demoAccountPassword" + case demoAccountRequired = "demoAccountRequired" + case notes = "notes" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaAppReviewDetails */ + public var fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(id: String, fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + self.id = id + self.fieldsbetaAppReviewDetails = fieldsbetaAppReviewDetails + self.include = include + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaAppReviewDetailsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaAppReviewDetails: [FieldsbetaAppReviewDetails]? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(id: id, fieldsbetaAppReviewDetails: fieldsbetaAppReviewDetails, include: include, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaAppReviewDetails = options.fieldsbetaAppReviewDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppReviewDetails]"] = fieldsbetaAppReviewDetails + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaAppReviewDetailResponse + + /** Single BetaAppReviewDetail */ + case status200(BetaAppReviewDetailResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaAppReviewDetailResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaAppReviewDetailResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsUpdateInstance.swift new file mode 100644 index 000000000..bc4cbff50 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewDetails/BetaAppReviewDetailsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaAppReviewDetails { + + public enum BetaAppReviewDetailsUpdateInstance { + + public static let service = APIService(id: "betaAppReviewDetails-update_instance", tag: "BetaAppReviewDetails", method: "PATCH", path: "/v1/betaAppReviewDetails/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BetaAppReviewDetailUpdateRequest + + public init(body: BetaAppReviewDetailUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BetaAppReviewDetailsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BetaAppReviewDetailUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaAppReviewDetailResponse + + /** Single BetaAppReviewDetail */ + case status200(BetaAppReviewDetailResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BetaAppReviewDetailResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaAppReviewDetailResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsBuildGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsBuildGetToOneRelated.swift new file mode 100644 index 000000000..5e98d70c1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsBuildGetToOneRelated.swift @@ -0,0 +1,173 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaAppReviewSubmissions { + + public enum BetaAppReviewSubmissionsBuildGetToOneRelated { + + public static let service = APIService(id: "betaAppReviewSubmissions-build-get_to_one_related", tag: "BetaAppReviewSubmissions", method: "GET", path: "/v1/betaAppReviewSubmissions/{id}/build", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + public init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil) { + self.id = id + self.fieldsbuilds = fieldsbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaAppReviewSubmissionsBuildGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil) { + let options = Options(id: id, fieldsbuilds: fieldsbuilds) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildResponse + + /** Related resource */ + case status200(BuildResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BuildResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsCreateInstance.swift new file mode 100644 index 000000000..a855ddca8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaAppReviewSubmissions { + + public enum BetaAppReviewSubmissionsCreateInstance { + + public static let service = APIService(id: "betaAppReviewSubmissions-create_instance", tag: "BetaAppReviewSubmissions", method: "POST", path: "/v1/betaAppReviewSubmissions", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: BetaAppReviewSubmissionCreateRequest + + public init(body: BetaAppReviewSubmissionCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: BetaAppReviewSubmissionsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaAppReviewSubmissionResponse + + /** Single BetaAppReviewSubmission */ + case status201(BetaAppReviewSubmissionResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BetaAppReviewSubmissionResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(BetaAppReviewSubmissionResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsGetCollection.swift new file mode 100644 index 000000000..23f02d8d7 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsGetCollection.swift @@ -0,0 +1,209 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaAppReviewSubmissions { + + public enum BetaAppReviewSubmissionsGetCollection { + + public static let service = APIService(id: "betaAppReviewSubmissions-get_collection", tag: "BetaAppReviewSubmissions", method: "GET", path: "/v1/betaAppReviewSubmissions", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'betaReviewState' */ + public enum FilterbetaReviewState: String, Codable, Equatable, CaseIterable { + case waitingForReview = "WAITING_FOR_REVIEW" + case inReview = "IN_REVIEW" + case rejected = "REJECTED" + case approved = "APPROVED" + } + + /** the fields to include for returned resources of type betaAppReviewSubmissions */ + public enum FieldsbetaAppReviewSubmissions: String, Codable, Equatable, CaseIterable { + case betaReviewState = "betaReviewState" + case build = "build" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case build = "build" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'betaReviewState' */ + public var filterbetaReviewState: [FilterbetaReviewState]? + + /** filter by id(s) of related 'build' */ + public var filterbuild: [String] + + /** the fields to include for returned resources of type betaAppReviewSubmissions */ + public var fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + public init(filterbetaReviewState: [FilterbetaReviewState]? = nil, filterbuild: [String], fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil) { + self.filterbetaReviewState = filterbetaReviewState + self.filterbuild = filterbuild + self.fieldsbetaAppReviewSubmissions = fieldsbetaAppReviewSubmissions + self.limit = limit + self.include = include + self.fieldsbuilds = fieldsbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaAppReviewSubmissionsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterbetaReviewState: [FilterbetaReviewState]? = nil, filterbuild: [String], fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil) { + let options = Options(filterbetaReviewState: filterbetaReviewState, filterbuild: filterbuild, fieldsbetaAppReviewSubmissions: fieldsbetaAppReviewSubmissions, limit: limit, include: include, fieldsbuilds: fieldsbuilds) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterbetaReviewState = options.filterbetaReviewState?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[betaReviewState]"] = filterbetaReviewState + } + params["filter[build]"] = options.filterbuild.joined(separator: ",") + if let fieldsbetaAppReviewSubmissions = options.fieldsbetaAppReviewSubmissions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppReviewSubmissions]"] = fieldsbetaAppReviewSubmissions + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaAppReviewSubmissionsResponse + + /** List of BetaAppReviewSubmissions */ + case status200(BetaAppReviewSubmissionsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: BetaAppReviewSubmissionsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaAppReviewSubmissionsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsGetInstance.swift new file mode 100644 index 000000000..ebc2389f4 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaAppReviewSubmissions/BetaAppReviewSubmissionsGetInstance.swift @@ -0,0 +1,198 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaAppReviewSubmissions { + + public enum BetaAppReviewSubmissionsGetInstance { + + public static let service = APIService(id: "betaAppReviewSubmissions-get_instance", tag: "BetaAppReviewSubmissions", method: "GET", path: "/v1/betaAppReviewSubmissions/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaAppReviewSubmissions */ + public enum FieldsbetaAppReviewSubmissions: String, Codable, Equatable, CaseIterable { + case betaReviewState = "betaReviewState" + case build = "build" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case build = "build" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaAppReviewSubmissions */ + public var fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + public init(id: String, fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil) { + self.id = id + self.fieldsbetaAppReviewSubmissions = fieldsbetaAppReviewSubmissions + self.include = include + self.fieldsbuilds = fieldsbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaAppReviewSubmissionsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil) { + let options = Options(id: id, fieldsbetaAppReviewSubmissions: fieldsbetaAppReviewSubmissions, include: include, fieldsbuilds: fieldsbuilds) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaAppReviewSubmissions = options.fieldsbetaAppReviewSubmissions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppReviewSubmissions]"] = fieldsbetaAppReviewSubmissions + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaAppReviewSubmissionResponse + + /** Single BetaAppReviewSubmission */ + case status200(BetaAppReviewSubmissionResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaAppReviewSubmissionResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaAppReviewSubmissionResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsBuildGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsBuildGetToOneRelated.swift new file mode 100644 index 000000000..e19f6eb8a --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsBuildGetToOneRelated.swift @@ -0,0 +1,173 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaBuildLocalizations { + + public enum BetaBuildLocalizationsBuildGetToOneRelated { + + public static let service = APIService(id: "betaBuildLocalizations-build-get_to_one_related", tag: "BetaBuildLocalizations", method: "GET", path: "/v1/betaBuildLocalizations/{id}/build", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + public init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil) { + self.id = id + self.fieldsbuilds = fieldsbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaBuildLocalizationsBuildGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil) { + let options = Options(id: id, fieldsbuilds: fieldsbuilds) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildResponse + + /** Related resource */ + case status200(BuildResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BuildResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsCreateInstance.swift new file mode 100644 index 000000000..06fdf6224 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaBuildLocalizations { + + public enum BetaBuildLocalizationsCreateInstance { + + public static let service = APIService(id: "betaBuildLocalizations-create_instance", tag: "BetaBuildLocalizations", method: "POST", path: "/v1/betaBuildLocalizations", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: BetaBuildLocalizationCreateRequest + + public init(body: BetaBuildLocalizationCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: BetaBuildLocalizationsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaBuildLocalizationResponse + + /** Single BetaBuildLocalization */ + case status201(BetaBuildLocalizationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BetaBuildLocalizationResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(BetaBuildLocalizationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsDeleteInstance.swift new file mode 100644 index 000000000..0e4b7c2ab --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaBuildLocalizations { + + public enum BetaBuildLocalizationsDeleteInstance { + + public static let service = APIService(id: "betaBuildLocalizations-delete_instance", tag: "BetaBuildLocalizations", method: "DELETE", path: "/v1/betaBuildLocalizations/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaBuildLocalizationsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsGetCollection.swift new file mode 100644 index 000000000..c692e9edd --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsGetCollection.swift @@ -0,0 +1,204 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaBuildLocalizations { + + public enum BetaBuildLocalizationsGetCollection { + + public static let service = APIService(id: "betaBuildLocalizations-get_collection", tag: "BetaBuildLocalizations", method: "GET", path: "/v1/betaBuildLocalizations", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaBuildLocalizations */ + public enum FieldsbetaBuildLocalizations: String, Codable, Equatable, CaseIterable { + case build = "build" + case locale = "locale" + case whatsNew = "whatsNew" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case build = "build" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'locale' */ + public var filterlocale: [String]? + + /** filter by id(s) of related 'build' */ + public var filterbuild: [String]? + + /** the fields to include for returned resources of type betaBuildLocalizations */ + public var fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + public init(filterlocale: [String]? = nil, filterbuild: [String]? = nil, fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil) { + self.filterlocale = filterlocale + self.filterbuild = filterbuild + self.fieldsbetaBuildLocalizations = fieldsbetaBuildLocalizations + self.limit = limit + self.include = include + self.fieldsbuilds = fieldsbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaBuildLocalizationsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterlocale: [String]? = nil, filterbuild: [String]? = nil, fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil) { + let options = Options(filterlocale: filterlocale, filterbuild: filterbuild, fieldsbetaBuildLocalizations: fieldsbetaBuildLocalizations, limit: limit, include: include, fieldsbuilds: fieldsbuilds) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterlocale = options.filterlocale?.joined(separator: ",") { + params["filter[locale]"] = filterlocale + } + if let filterbuild = options.filterbuild?.joined(separator: ",") { + params["filter[build]"] = filterbuild + } + if let fieldsbetaBuildLocalizations = options.fieldsbetaBuildLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaBuildLocalizations]"] = fieldsbetaBuildLocalizations + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaBuildLocalizationsResponse + + /** List of BetaBuildLocalizations */ + case status200(BetaBuildLocalizationsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: BetaBuildLocalizationsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaBuildLocalizationsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsGetInstance.swift new file mode 100644 index 000000000..97a0e12a8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsGetInstance.swift @@ -0,0 +1,199 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaBuildLocalizations { + + public enum BetaBuildLocalizationsGetInstance { + + public static let service = APIService(id: "betaBuildLocalizations-get_instance", tag: "BetaBuildLocalizations", method: "GET", path: "/v1/betaBuildLocalizations/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaBuildLocalizations */ + public enum FieldsbetaBuildLocalizations: String, Codable, Equatable, CaseIterable { + case build = "build" + case locale = "locale" + case whatsNew = "whatsNew" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case build = "build" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaBuildLocalizations */ + public var fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + public init(id: String, fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil) { + self.id = id + self.fieldsbetaBuildLocalizations = fieldsbetaBuildLocalizations + self.include = include + self.fieldsbuilds = fieldsbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaBuildLocalizationsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil) { + let options = Options(id: id, fieldsbetaBuildLocalizations: fieldsbetaBuildLocalizations, include: include, fieldsbuilds: fieldsbuilds) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaBuildLocalizations = options.fieldsbetaBuildLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaBuildLocalizations]"] = fieldsbetaBuildLocalizations + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaBuildLocalizationResponse + + /** Single BetaBuildLocalization */ + case status200(BetaBuildLocalizationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaBuildLocalizationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaBuildLocalizationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsUpdateInstance.swift new file mode 100644 index 000000000..aaa49520e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaBuildLocalizations/BetaBuildLocalizationsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaBuildLocalizations { + + public enum BetaBuildLocalizationsUpdateInstance { + + public static let service = APIService(id: "betaBuildLocalizations-update_instance", tag: "BetaBuildLocalizations", method: "PATCH", path: "/v1/betaBuildLocalizations/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BetaBuildLocalizationUpdateRequest + + public init(body: BetaBuildLocalizationUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BetaBuildLocalizationsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BetaBuildLocalizationUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaBuildLocalizationResponse + + /** Single BetaBuildLocalization */ + case status200(BetaBuildLocalizationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BetaBuildLocalizationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaBuildLocalizationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsAppGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsAppGetToOneRelated.swift new file mode 100644 index 000000000..f6acd1cd2 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsAppGetToOneRelated.swift @@ -0,0 +1,176 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaGroups { + + public enum BetaGroupsAppGetToOneRelated { + + public static let service = APIService(id: "betaGroups-app-get_to_one_related", tag: "BetaGroups", method: "GET", path: "/v1/betaGroups/{id}/app", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(id: String, fieldsapps: [Fieldsapps]? = nil) { + self.id = id + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaGroupsAppGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(id: id, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppResponse + + /** Related resource */ + case status200(AppResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersCreateToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersCreateToManyRelationship.swift new file mode 100644 index 000000000..0ce51d9d4 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersCreateToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaGroups { + + public enum BetaGroupsBetaTestersCreateToManyRelationship { + + public static let service = APIService(id: "betaGroups-betaTesters-create_to_many_relationship", tag: "BetaGroups", method: "POST", path: "/v1/betaGroups/{id}/relationships/betaTesters", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BetaGroupBetaTestersLinkagesRequest + + public init(body: BetaGroupBetaTestersLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BetaGroupsBetaTestersCreateToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BetaGroupBetaTestersLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersDeleteToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersDeleteToManyRelationship.swift new file mode 100644 index 000000000..c8f0c2bb5 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersDeleteToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaGroups { + + public enum BetaGroupsBetaTestersDeleteToManyRelationship { + + public static let service = APIService(id: "betaGroups-betaTesters-delete_to_many_relationship", tag: "BetaGroups", method: "DELETE", path: "/v1/betaGroups/{id}/relationships/betaTesters", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BetaGroupBetaTestersLinkagesRequest + + public init(body: BetaGroupBetaTestersLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BetaGroupsBetaTestersDeleteToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BetaGroupBetaTestersLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersGetToManyRelated.swift new file mode 100644 index 000000000..2148dd581 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersGetToManyRelated.swift @@ -0,0 +1,167 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaGroups { + + public enum BetaGroupsBetaTestersGetToManyRelated { + + public static let service = APIService(id: "betaGroups-betaTesters-get_to_many_related", tag: "BetaGroups", method: "GET", path: "/v1/betaGroups/{id}/betaTesters", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaTesters */ + public enum FieldsbetaTesters: String, Codable, Equatable, CaseIterable { + case apps = "apps" + case betaGroups = "betaGroups" + case builds = "builds" + case email = "email" + case firstName = "firstName" + case inviteType = "inviteType" + case lastName = "lastName" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaTesters */ + public var fieldsbetaTesters: [FieldsbetaTesters]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsbetaTesters: [FieldsbetaTesters]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsbetaTesters = fieldsbetaTesters + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaGroupsBetaTestersGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaTesters: [FieldsbetaTesters]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsbetaTesters: fieldsbetaTesters, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaTesters = options.fieldsbetaTesters?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaTesters]"] = fieldsbetaTesters + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaTestersResponse + + /** List of related resources */ + case status200(BetaTestersResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaTestersResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaTestersResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersGetToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersGetToManyRelationship.swift new file mode 100644 index 000000000..0274e4a43 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBetaTestersGetToManyRelationship.swift @@ -0,0 +1,149 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaGroups { + + public enum BetaGroupsBetaTestersGetToManyRelationship { + + public static let service = APIService(id: "betaGroups-betaTesters-get_to_many_relationship", tag: "BetaGroups", method: "GET", path: "/v1/betaGroups/{id}/relationships/betaTesters", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, limit: Int? = nil) { + self.id = id + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaGroupsBetaTestersGetToManyRelationship.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, limit: Int? = nil) { + let options = Options(id: id, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaGroupBetaTestersLinkagesResponse + + /** List of related linkages */ + case status200(BetaGroupBetaTestersLinkagesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaGroupBetaTestersLinkagesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaGroupBetaTestersLinkagesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsCreateToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsCreateToManyRelationship.swift new file mode 100644 index 000000000..377bf9492 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsCreateToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaGroups { + + public enum BetaGroupsBuildsCreateToManyRelationship { + + public static let service = APIService(id: "betaGroups-builds-create_to_many_relationship", tag: "BetaGroups", method: "POST", path: "/v1/betaGroups/{id}/relationships/builds", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BetaGroupBuildsLinkagesRequest + + public init(body: BetaGroupBuildsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BetaGroupsBuildsCreateToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BetaGroupBuildsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsDeleteToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsDeleteToManyRelationship.swift new file mode 100644 index 000000000..c88f8780d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsDeleteToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaGroups { + + public enum BetaGroupsBuildsDeleteToManyRelationship { + + public static let service = APIService(id: "betaGroups-builds-delete_to_many_relationship", tag: "BetaGroups", method: "DELETE", path: "/v1/betaGroups/{id}/relationships/builds", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BetaGroupBuildsLinkagesRequest + + public init(body: BetaGroupBuildsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BetaGroupsBuildsDeleteToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BetaGroupBuildsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsGetToManyRelated.swift new file mode 100644 index 000000000..8ce11e894 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsGetToManyRelated.swift @@ -0,0 +1,180 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaGroups { + + public enum BetaGroupsBuildsGetToManyRelated { + + public static let service = APIService(id: "betaGroups-builds-get_to_many_related", tag: "BetaGroups", method: "GET", path: "/v1/betaGroups/{id}/builds", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsbuilds = fieldsbuilds + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaGroupsBuildsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsbuilds: fieldsbuilds, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildsResponse + + /** List of related resources */ + case status200(BuildsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BuildsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsGetToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsGetToManyRelationship.swift new file mode 100644 index 000000000..a41795139 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsBuildsGetToManyRelationship.swift @@ -0,0 +1,149 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaGroups { + + public enum BetaGroupsBuildsGetToManyRelationship { + + public static let service = APIService(id: "betaGroups-builds-get_to_many_relationship", tag: "BetaGroups", method: "GET", path: "/v1/betaGroups/{id}/relationships/builds", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, limit: Int? = nil) { + self.id = id + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaGroupsBuildsGetToManyRelationship.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, limit: Int? = nil) { + let options = Options(id: id, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaGroupBuildsLinkagesResponse + + /** List of related linkages */ + case status200(BetaGroupBuildsLinkagesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaGroupBuildsLinkagesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaGroupBuildsLinkagesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsCreateInstance.swift new file mode 100644 index 000000000..fa5375e25 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaGroups { + + public enum BetaGroupsCreateInstance { + + public static let service = APIService(id: "betaGroups-create_instance", tag: "BetaGroups", method: "POST", path: "/v1/betaGroups", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: BetaGroupCreateRequest + + public init(body: BetaGroupCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: BetaGroupsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaGroupResponse + + /** Single BetaGroup */ + case status201(BetaGroupResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BetaGroupResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(BetaGroupResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsDeleteInstance.swift new file mode 100644 index 000000000..fd63c61c3 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaGroups { + + public enum BetaGroupsDeleteInstance { + + public static let service = APIService(id: "betaGroups-delete_instance", tag: "BetaGroups", method: "DELETE", path: "/v1/betaGroups/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaGroupsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsGetCollection.swift new file mode 100644 index 000000000..30317eca8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsGetCollection.swift @@ -0,0 +1,342 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaGroups { + + public enum BetaGroupsGetCollection { + + public static let service = APIService(id: "betaGroups-get_collection", tag: "BetaGroups", method: "GET", path: "/v1/betaGroups", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public enum Sort: String, Codable, Equatable, CaseIterable { + case createdDate = "createdDate" + case createdDate = "-createdDate" + case name = "name" + case name = "-name" + case publicLinkEnabled = "publicLinkEnabled" + case publicLinkEnabled = "-publicLinkEnabled" + case publicLinkLimit = "publicLinkLimit" + case publicLinkLimit = "-publicLinkLimit" + } + + /** the fields to include for returned resources of type betaGroups */ + public enum FieldsbetaGroups: String, Codable, Equatable, CaseIterable { + case app = "app" + case betaTesters = "betaTesters" + case builds = "builds" + case createdDate = "createdDate" + case feedbackEnabled = "feedbackEnabled" + case isInternalGroup = "isInternalGroup" + case name = "name" + case publicLink = "publicLink" + case publicLinkEnabled = "publicLinkEnabled" + case publicLinkId = "publicLinkId" + case publicLinkLimit = "publicLinkLimit" + case publicLinkLimitEnabled = "publicLinkLimitEnabled" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case betaTesters = "betaTesters" + case builds = "builds" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + /** the fields to include for returned resources of type betaTesters */ + public enum FieldsbetaTesters: String, Codable, Equatable, CaseIterable { + case apps = "apps" + case betaGroups = "betaGroups" + case builds = "builds" + case email = "email" + case firstName = "firstName" + case inviteType = "inviteType" + case lastName = "lastName" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'isInternalGroup' */ + public var filterisInternalGroup: [String]? + + /** filter by attribute 'name' */ + public var filtername: [String]? + + /** filter by attribute 'publicLink' */ + public var filterpublicLink: [String]? + + /** filter by attribute 'publicLinkEnabled' */ + public var filterpublicLinkEnabled: [String]? + + /** filter by attribute 'publicLinkLimitEnabled' */ + public var filterpublicLinkLimitEnabled: [String]? + + /** filter by id(s) of related 'app' */ + public var filterapp: [String]? + + /** filter by id(s) of related 'builds' */ + public var filterbuilds: [String]? + + /** filter by id(s) */ + public var filterid: [String]? + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public var sort: [Sort]? + + /** the fields to include for returned resources of type betaGroups */ + public var fieldsbetaGroups: [FieldsbetaGroups]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** the fields to include for returned resources of type betaTesters */ + public var fieldsbetaTesters: [FieldsbetaTesters]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum number of related betaTesters returned (when they are included) */ + public var limitbetaTesters: Int? + + /** maximum number of related builds returned (when they are included) */ + public var limitbuilds: Int? + + public init(filterisInternalGroup: [String]? = nil, filtername: [String]? = nil, filterpublicLink: [String]? = nil, filterpublicLinkEnabled: [String]? = nil, filterpublicLinkLimitEnabled: [String]? = nil, filterapp: [String]? = nil, filterbuilds: [String]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldsbetaGroups: [FieldsbetaGroups]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsbetaTesters: [FieldsbetaTesters]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbetaTesters: Int? = nil, limitbuilds: Int? = nil) { + self.filterisInternalGroup = filterisInternalGroup + self.filtername = filtername + self.filterpublicLink = filterpublicLink + self.filterpublicLinkEnabled = filterpublicLinkEnabled + self.filterpublicLinkLimitEnabled = filterpublicLinkLimitEnabled + self.filterapp = filterapp + self.filterbuilds = filterbuilds + self.filterid = filterid + self.sort = sort + self.fieldsbetaGroups = fieldsbetaGroups + self.limit = limit + self.include = include + self.fieldsbuilds = fieldsbuilds + self.fieldsbetaTesters = fieldsbetaTesters + self.fieldsapps = fieldsapps + self.limitbetaTesters = limitbetaTesters + self.limitbuilds = limitbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaGroupsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterisInternalGroup: [String]? = nil, filtername: [String]? = nil, filterpublicLink: [String]? = nil, filterpublicLinkEnabled: [String]? = nil, filterpublicLinkLimitEnabled: [String]? = nil, filterapp: [String]? = nil, filterbuilds: [String]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldsbetaGroups: [FieldsbetaGroups]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsbetaTesters: [FieldsbetaTesters]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbetaTesters: Int? = nil, limitbuilds: Int? = nil) { + let options = Options(filterisInternalGroup: filterisInternalGroup, filtername: filtername, filterpublicLink: filterpublicLink, filterpublicLinkEnabled: filterpublicLinkEnabled, filterpublicLinkLimitEnabled: filterpublicLinkLimitEnabled, filterapp: filterapp, filterbuilds: filterbuilds, filterid: filterid, sort: sort, fieldsbetaGroups: fieldsbetaGroups, limit: limit, include: include, fieldsbuilds: fieldsbuilds, fieldsbetaTesters: fieldsbetaTesters, fieldsapps: fieldsapps, limitbetaTesters: limitbetaTesters, limitbuilds: limitbuilds) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterisInternalGroup = options.filterisInternalGroup?.joined(separator: ",") { + params["filter[isInternalGroup]"] = filterisInternalGroup + } + if let filtername = options.filtername?.joined(separator: ",") { + params["filter[name]"] = filtername + } + if let filterpublicLink = options.filterpublicLink?.joined(separator: ",") { + params["filter[publicLink]"] = filterpublicLink + } + if let filterpublicLinkEnabled = options.filterpublicLinkEnabled?.joined(separator: ",") { + params["filter[publicLinkEnabled]"] = filterpublicLinkEnabled + } + if let filterpublicLinkLimitEnabled = options.filterpublicLinkLimitEnabled?.joined(separator: ",") { + params["filter[publicLinkLimitEnabled]"] = filterpublicLinkLimitEnabled + } + if let filterapp = options.filterapp?.joined(separator: ",") { + params["filter[app]"] = filterapp + } + if let filterbuilds = options.filterbuilds?.joined(separator: ",") { + params["filter[builds]"] = filterbuilds + } + if let filterid = options.filterid?.joined(separator: ",") { + params["filter[id]"] = filterid + } + if let sort = options.sort?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["sort"] = sort + } + if let fieldsbetaGroups = options.fieldsbetaGroups?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaGroups]"] = fieldsbetaGroups + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let fieldsbetaTesters = options.fieldsbetaTesters?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaTesters]"] = fieldsbetaTesters + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limitbetaTesters = options.limitbetaTesters { + params["limit[betaTesters]"] = limitbetaTesters + } + if let limitbuilds = options.limitbuilds { + params["limit[builds]"] = limitbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaGroupsResponse + + /** List of BetaGroups */ + case status200(BetaGroupsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: BetaGroupsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaGroupsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsGetInstance.swift new file mode 100644 index 000000000..607655d10 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsGetInstance.swift @@ -0,0 +1,276 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaGroups { + + public enum BetaGroupsGetInstance { + + public static let service = APIService(id: "betaGroups-get_instance", tag: "BetaGroups", method: "GET", path: "/v1/betaGroups/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaGroups */ + public enum FieldsbetaGroups: String, Codable, Equatable, CaseIterable { + case app = "app" + case betaTesters = "betaTesters" + case builds = "builds" + case createdDate = "createdDate" + case feedbackEnabled = "feedbackEnabled" + case isInternalGroup = "isInternalGroup" + case name = "name" + case publicLink = "publicLink" + case publicLinkEnabled = "publicLinkEnabled" + case publicLinkId = "publicLinkId" + case publicLinkLimit = "publicLinkLimit" + case publicLinkLimitEnabled = "publicLinkLimitEnabled" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case betaTesters = "betaTesters" + case builds = "builds" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + /** the fields to include for returned resources of type betaTesters */ + public enum FieldsbetaTesters: String, Codable, Equatable, CaseIterable { + case apps = "apps" + case betaGroups = "betaGroups" + case builds = "builds" + case email = "email" + case firstName = "firstName" + case inviteType = "inviteType" + case lastName = "lastName" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaGroups */ + public var fieldsbetaGroups: [FieldsbetaGroups]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** the fields to include for returned resources of type betaTesters */ + public var fieldsbetaTesters: [FieldsbetaTesters]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum number of related betaTesters returned (when they are included) */ + public var limitbetaTesters: Int? + + /** maximum number of related builds returned (when they are included) */ + public var limitbuilds: Int? + + public init(id: String, fieldsbetaGroups: [FieldsbetaGroups]? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsbetaTesters: [FieldsbetaTesters]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbetaTesters: Int? = nil, limitbuilds: Int? = nil) { + self.id = id + self.fieldsbetaGroups = fieldsbetaGroups + self.include = include + self.fieldsbuilds = fieldsbuilds + self.fieldsbetaTesters = fieldsbetaTesters + self.fieldsapps = fieldsapps + self.limitbetaTesters = limitbetaTesters + self.limitbuilds = limitbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaGroupsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaGroups: [FieldsbetaGroups]? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsbetaTesters: [FieldsbetaTesters]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbetaTesters: Int? = nil, limitbuilds: Int? = nil) { + let options = Options(id: id, fieldsbetaGroups: fieldsbetaGroups, include: include, fieldsbuilds: fieldsbuilds, fieldsbetaTesters: fieldsbetaTesters, fieldsapps: fieldsapps, limitbetaTesters: limitbetaTesters, limitbuilds: limitbuilds) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaGroups = options.fieldsbetaGroups?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaGroups]"] = fieldsbetaGroups + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let fieldsbetaTesters = options.fieldsbetaTesters?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaTesters]"] = fieldsbetaTesters + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limitbetaTesters = options.limitbetaTesters { + params["limit[betaTesters]"] = limitbetaTesters + } + if let limitbuilds = options.limitbuilds { + params["limit[builds]"] = limitbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaGroupResponse + + /** Single BetaGroup */ + case status200(BetaGroupResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaGroupResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaGroupResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsUpdateInstance.swift new file mode 100644 index 000000000..b5a796e20 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaGroups { + + public enum BetaGroupsUpdateInstance { + + public static let service = APIService(id: "betaGroups-update_instance", tag: "BetaGroups", method: "PATCH", path: "/v1/betaGroups/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BetaGroupUpdateRequest + + public init(body: BetaGroupUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BetaGroupsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BetaGroupUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaGroupResponse + + /** Single BetaGroup */ + case status200(BetaGroupResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BetaGroupResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaGroupResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsAppGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsAppGetToOneRelated.swift new file mode 100644 index 000000000..57da80ee6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsAppGetToOneRelated.swift @@ -0,0 +1,176 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaLicenseAgreements { + + public enum BetaLicenseAgreementsAppGetToOneRelated { + + public static let service = APIService(id: "betaLicenseAgreements-app-get_to_one_related", tag: "BetaLicenseAgreements", method: "GET", path: "/v1/betaLicenseAgreements/{id}/app", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(id: String, fieldsapps: [Fieldsapps]? = nil) { + self.id = id + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaLicenseAgreementsAppGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(id: id, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppResponse + + /** Related resource */ + case status200(AppResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsGetCollection.swift new file mode 100644 index 000000000..e95020caf --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsGetCollection.swift @@ -0,0 +1,199 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaLicenseAgreements { + + public enum BetaLicenseAgreementsGetCollection { + + public static let service = APIService(id: "betaLicenseAgreements-get_collection", tag: "BetaLicenseAgreements", method: "GET", path: "/v1/betaLicenseAgreements", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaLicenseAgreements */ + public enum FieldsbetaLicenseAgreements: String, Codable, Equatable, CaseIterable { + case agreementText = "agreementText" + case app = "app" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by id(s) of related 'app' */ + public var filterapp: [String]? + + /** the fields to include for returned resources of type betaLicenseAgreements */ + public var fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(filterapp: [String]? = nil, fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + self.filterapp = filterapp + self.fieldsbetaLicenseAgreements = fieldsbetaLicenseAgreements + self.limit = limit + self.include = include + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaLicenseAgreementsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterapp: [String]? = nil, fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(filterapp: filterapp, fieldsbetaLicenseAgreements: fieldsbetaLicenseAgreements, limit: limit, include: include, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterapp = options.filterapp?.joined(separator: ",") { + params["filter[app]"] = filterapp + } + if let fieldsbetaLicenseAgreements = options.fieldsbetaLicenseAgreements?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaLicenseAgreements]"] = fieldsbetaLicenseAgreements + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaLicenseAgreementsResponse + + /** List of BetaLicenseAgreements */ + case status200(BetaLicenseAgreementsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: BetaLicenseAgreementsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaLicenseAgreementsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsGetInstance.swift new file mode 100644 index 000000000..c07ef5bcf --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsGetInstance.swift @@ -0,0 +1,201 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaLicenseAgreements { + + public enum BetaLicenseAgreementsGetInstance { + + public static let service = APIService(id: "betaLicenseAgreements-get_instance", tag: "BetaLicenseAgreements", method: "GET", path: "/v1/betaLicenseAgreements/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaLicenseAgreements */ + public enum FieldsbetaLicenseAgreements: String, Codable, Equatable, CaseIterable { + case agreementText = "agreementText" + case app = "app" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaLicenseAgreements */ + public var fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(id: String, fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + self.id = id + self.fieldsbetaLicenseAgreements = fieldsbetaLicenseAgreements + self.include = include + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaLicenseAgreementsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaLicenseAgreements: [FieldsbetaLicenseAgreements]? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(id: id, fieldsbetaLicenseAgreements: fieldsbetaLicenseAgreements, include: include, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaLicenseAgreements = options.fieldsbetaLicenseAgreements?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaLicenseAgreements]"] = fieldsbetaLicenseAgreements + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaLicenseAgreementResponse + + /** Single BetaLicenseAgreement */ + case status200(BetaLicenseAgreementResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaLicenseAgreementResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaLicenseAgreementResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsUpdateInstance.swift new file mode 100644 index 000000000..75b68be0a --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaLicenseAgreements/BetaLicenseAgreementsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaLicenseAgreements { + + public enum BetaLicenseAgreementsUpdateInstance { + + public static let service = APIService(id: "betaLicenseAgreements-update_instance", tag: "BetaLicenseAgreements", method: "PATCH", path: "/v1/betaLicenseAgreements/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BetaLicenseAgreementUpdateRequest + + public init(body: BetaLicenseAgreementUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BetaLicenseAgreementsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BetaLicenseAgreementUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaLicenseAgreementResponse + + /** Single BetaLicenseAgreement */ + case status200(BetaLicenseAgreementResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BetaLicenseAgreementResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaLicenseAgreementResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesterInvitations/BetaTesterInvitationsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesterInvitations/BetaTesterInvitationsCreateInstance.swift new file mode 100644 index 000000000..4c3037b3b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesterInvitations/BetaTesterInvitationsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesterInvitations { + + public enum BetaTesterInvitationsCreateInstance { + + public static let service = APIService(id: "betaTesterInvitations-create_instance", tag: "BetaTesterInvitations", method: "POST", path: "/v1/betaTesterInvitations", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: BetaTesterInvitationCreateRequest + + public init(body: BetaTesterInvitationCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: BetaTesterInvitationsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaTesterInvitationResponse + + /** Single BetaTesterInvitation */ + case status201(BetaTesterInvitationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BetaTesterInvitationResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(BetaTesterInvitationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersAppsDeleteToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersAppsDeleteToManyRelationship.swift new file mode 100644 index 000000000..c64278c99 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersAppsDeleteToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersAppsDeleteToManyRelationship { + + public static let service = APIService(id: "betaTesters-apps-delete_to_many_relationship", tag: "BetaTesters", method: "DELETE", path: "/v1/betaTesters/{id}/relationships/apps", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BetaTesterAppsLinkagesRequest + + public init(body: BetaTesterAppsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BetaTestersAppsDeleteToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BetaTesterAppsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersAppsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersAppsGetToManyRelated.swift new file mode 100644 index 000000000..c86054908 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersAppsGetToManyRelated.swift @@ -0,0 +1,183 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersAppsGetToManyRelated { + + public static let service = APIService(id: "betaTesters-apps-get_to_many_related", tag: "BetaTesters", method: "GET", path: "/v1/betaTesters/{id}/apps", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsapps = fieldsapps + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaTestersAppsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsapps: fieldsapps, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppsResponse + + /** List of related resources */ + case status200(AppsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersAppsGetToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersAppsGetToManyRelationship.swift new file mode 100644 index 000000000..51de34898 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersAppsGetToManyRelationship.swift @@ -0,0 +1,149 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersAppsGetToManyRelationship { + + public static let service = APIService(id: "betaTesters-apps-get_to_many_relationship", tag: "BetaTesters", method: "GET", path: "/v1/betaTesters/{id}/relationships/apps", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, limit: Int? = nil) { + self.id = id + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaTestersAppsGetToManyRelationship.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, limit: Int? = nil) { + let options = Options(id: id, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaTesterAppsLinkagesResponse + + /** List of related linkages */ + case status200(BetaTesterAppsLinkagesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaTesterAppsLinkagesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaTesterAppsLinkagesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsCreateToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsCreateToManyRelationship.swift new file mode 100644 index 000000000..b2129c911 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsCreateToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersBetaGroupsCreateToManyRelationship { + + public static let service = APIService(id: "betaTesters-betaGroups-create_to_many_relationship", tag: "BetaTesters", method: "POST", path: "/v1/betaTesters/{id}/relationships/betaGroups", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BetaTesterBetaGroupsLinkagesRequest + + public init(body: BetaTesterBetaGroupsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BetaTestersBetaGroupsCreateToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BetaTesterBetaGroupsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsDeleteToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsDeleteToManyRelationship.swift new file mode 100644 index 000000000..cbc633699 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsDeleteToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersBetaGroupsDeleteToManyRelationship { + + public static let service = APIService(id: "betaTesters-betaGroups-delete_to_many_relationship", tag: "BetaTesters", method: "DELETE", path: "/v1/betaTesters/{id}/relationships/betaGroups", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BetaTesterBetaGroupsLinkagesRequest + + public init(body: BetaTesterBetaGroupsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BetaTestersBetaGroupsDeleteToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BetaTesterBetaGroupsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsGetToManyRelated.swift new file mode 100644 index 000000000..8bd7c9d5c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsGetToManyRelated.swift @@ -0,0 +1,172 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersBetaGroupsGetToManyRelated { + + public static let service = APIService(id: "betaTesters-betaGroups-get_to_many_related", tag: "BetaTesters", method: "GET", path: "/v1/betaTesters/{id}/betaGroups", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaGroups */ + public enum FieldsbetaGroups: String, Codable, Equatable, CaseIterable { + case app = "app" + case betaTesters = "betaTesters" + case builds = "builds" + case createdDate = "createdDate" + case feedbackEnabled = "feedbackEnabled" + case isInternalGroup = "isInternalGroup" + case name = "name" + case publicLink = "publicLink" + case publicLinkEnabled = "publicLinkEnabled" + case publicLinkId = "publicLinkId" + case publicLinkLimit = "publicLinkLimit" + case publicLinkLimitEnabled = "publicLinkLimitEnabled" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaGroups */ + public var fieldsbetaGroups: [FieldsbetaGroups]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsbetaGroups: [FieldsbetaGroups]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsbetaGroups = fieldsbetaGroups + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaTestersBetaGroupsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaGroups: [FieldsbetaGroups]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsbetaGroups: fieldsbetaGroups, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaGroups = options.fieldsbetaGroups?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaGroups]"] = fieldsbetaGroups + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaGroupsResponse + + /** List of related resources */ + case status200(BetaGroupsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaGroupsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaGroupsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsGetToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsGetToManyRelationship.swift new file mode 100644 index 000000000..a45f10b56 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBetaGroupsGetToManyRelationship.swift @@ -0,0 +1,149 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersBetaGroupsGetToManyRelationship { + + public static let service = APIService(id: "betaTesters-betaGroups-get_to_many_relationship", tag: "BetaTesters", method: "GET", path: "/v1/betaTesters/{id}/relationships/betaGroups", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, limit: Int? = nil) { + self.id = id + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaTestersBetaGroupsGetToManyRelationship.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, limit: Int? = nil) { + let options = Options(id: id, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaTesterBetaGroupsLinkagesResponse + + /** List of related linkages */ + case status200(BetaTesterBetaGroupsLinkagesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaTesterBetaGroupsLinkagesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaTesterBetaGroupsLinkagesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsCreateToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsCreateToManyRelationship.swift new file mode 100644 index 000000000..d1cfb13ef --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsCreateToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersBuildsCreateToManyRelationship { + + public static let service = APIService(id: "betaTesters-builds-create_to_many_relationship", tag: "BetaTesters", method: "POST", path: "/v1/betaTesters/{id}/relationships/builds", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BetaTesterBuildsLinkagesRequest + + public init(body: BetaTesterBuildsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BetaTestersBuildsCreateToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BetaTesterBuildsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsDeleteToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsDeleteToManyRelationship.swift new file mode 100644 index 000000000..05af3fa81 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsDeleteToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersBuildsDeleteToManyRelationship { + + public static let service = APIService(id: "betaTesters-builds-delete_to_many_relationship", tag: "BetaTesters", method: "DELETE", path: "/v1/betaTesters/{id}/relationships/builds", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BetaTesterBuildsLinkagesRequest + + public init(body: BetaTesterBuildsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BetaTestersBuildsDeleteToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BetaTesterBuildsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsGetToManyRelated.swift new file mode 100644 index 000000000..a591dec7b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsGetToManyRelated.swift @@ -0,0 +1,180 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersBuildsGetToManyRelated { + + public static let service = APIService(id: "betaTesters-builds-get_to_many_related", tag: "BetaTesters", method: "GET", path: "/v1/betaTesters/{id}/builds", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsbuilds = fieldsbuilds + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaTestersBuildsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsbuilds: fieldsbuilds, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildsResponse + + /** List of related resources */ + case status200(BuildsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BuildsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsGetToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsGetToManyRelationship.swift new file mode 100644 index 000000000..de800a1cd --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersBuildsGetToManyRelationship.swift @@ -0,0 +1,149 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersBuildsGetToManyRelationship { + + public static let service = APIService(id: "betaTesters-builds-get_to_many_relationship", tag: "BetaTesters", method: "GET", path: "/v1/betaTesters/{id}/relationships/builds", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, limit: Int? = nil) { + self.id = id + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaTestersBuildsGetToManyRelationship.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, limit: Int? = nil) { + let options = Options(id: id, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaTesterBuildsLinkagesResponse + + /** List of related linkages */ + case status200(BetaTesterBuildsLinkagesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaTesterBuildsLinkagesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaTesterBuildsLinkagesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersCreateInstance.swift new file mode 100644 index 000000000..d2caad1bb --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersCreateInstance { + + public static let service = APIService(id: "betaTesters-create_instance", tag: "BetaTesters", method: "POST", path: "/v1/betaTesters", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: BetaTesterCreateRequest + + public init(body: BetaTesterCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: BetaTestersCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaTesterResponse + + /** Single BetaTester */ + case status201(BetaTesterResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BetaTesterResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(BetaTesterResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersDeleteInstance.swift new file mode 100644 index 000000000..eb134f9e7 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersDeleteInstance { + + public static let service = APIService(id: "betaTesters-delete_instance", tag: "BetaTesters", method: "DELETE", path: "/v1/betaTesters/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaTestersDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersGetCollection.swift new file mode 100644 index 000000000..377280f60 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersGetCollection.swift @@ -0,0 +1,348 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersGetCollection { + + public static let service = APIService(id: "betaTesters-get_collection", tag: "BetaTesters", method: "GET", path: "/v1/betaTesters", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'inviteType' */ + public enum FilterinviteType: String, Codable, Equatable, CaseIterable { + case email = "EMAIL" + case publicLink = "PUBLIC_LINK" + } + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public enum Sort: String, Codable, Equatable, CaseIterable { + case email = "email" + case email = "-email" + case firstName = "firstName" + case firstName = "-firstName" + case inviteType = "inviteType" + case inviteType = "-inviteType" + case lastName = "lastName" + case lastName = "-lastName" + } + + /** the fields to include for returned resources of type betaTesters */ + public enum FieldsbetaTesters: String, Codable, Equatable, CaseIterable { + case apps = "apps" + case betaGroups = "betaGroups" + case builds = "builds" + case email = "email" + case firstName = "firstName" + case inviteType = "inviteType" + case lastName = "lastName" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case apps = "apps" + case betaGroups = "betaGroups" + case builds = "builds" + } + + /** the fields to include for returned resources of type betaGroups */ + public enum FieldsbetaGroups: String, Codable, Equatable, CaseIterable { + case app = "app" + case betaTesters = "betaTesters" + case builds = "builds" + case createdDate = "createdDate" + case feedbackEnabled = "feedbackEnabled" + case isInternalGroup = "isInternalGroup" + case name = "name" + case publicLink = "publicLink" + case publicLinkEnabled = "publicLinkEnabled" + case publicLinkId = "publicLinkId" + case publicLinkLimit = "publicLinkLimit" + case publicLinkLimitEnabled = "publicLinkLimitEnabled" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'email' */ + public var filteremail: [String]? + + /** filter by attribute 'firstName' */ + public var filterfirstName: [String]? + + /** filter by attribute 'inviteType' */ + public var filterinviteType: [FilterinviteType]? + + /** filter by attribute 'lastName' */ + public var filterlastName: [String]? + + /** filter by id(s) of related 'apps' */ + public var filterapps: [String]? + + /** filter by id(s) of related 'betaGroups' */ + public var filterbetaGroups: [String]? + + /** filter by id(s) of related 'builds' */ + public var filterbuilds: [String]? + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public var sort: [Sort]? + + /** the fields to include for returned resources of type betaTesters */ + public var fieldsbetaTesters: [FieldsbetaTesters]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type betaGroups */ + public var fieldsbetaGroups: [FieldsbetaGroups]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum number of related apps returned (when they are included) */ + public var limitapps: Int? + + /** maximum number of related betaGroups returned (when they are included) */ + public var limitbetaGroups: Int? + + /** maximum number of related builds returned (when they are included) */ + public var limitbuilds: Int? + + public init(filteremail: [String]? = nil, filterfirstName: [String]? = nil, filterinviteType: [FilterinviteType]? = nil, filterlastName: [String]? = nil, filterapps: [String]? = nil, filterbetaGroups: [String]? = nil, filterbuilds: [String]? = nil, sort: [Sort]? = nil, fieldsbetaTesters: [FieldsbetaTesters]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbetaGroups: [FieldsbetaGroups]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsapps: [Fieldsapps]? = nil, limitapps: Int? = nil, limitbetaGroups: Int? = nil, limitbuilds: Int? = nil) { + self.filteremail = filteremail + self.filterfirstName = filterfirstName + self.filterinviteType = filterinviteType + self.filterlastName = filterlastName + self.filterapps = filterapps + self.filterbetaGroups = filterbetaGroups + self.filterbuilds = filterbuilds + self.sort = sort + self.fieldsbetaTesters = fieldsbetaTesters + self.limit = limit + self.include = include + self.fieldsbetaGroups = fieldsbetaGroups + self.fieldsbuilds = fieldsbuilds + self.fieldsapps = fieldsapps + self.limitapps = limitapps + self.limitbetaGroups = limitbetaGroups + self.limitbuilds = limitbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaTestersGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filteremail: [String]? = nil, filterfirstName: [String]? = nil, filterinviteType: [FilterinviteType]? = nil, filterlastName: [String]? = nil, filterapps: [String]? = nil, filterbetaGroups: [String]? = nil, filterbuilds: [String]? = nil, sort: [Sort]? = nil, fieldsbetaTesters: [FieldsbetaTesters]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbetaGroups: [FieldsbetaGroups]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsapps: [Fieldsapps]? = nil, limitapps: Int? = nil, limitbetaGroups: Int? = nil, limitbuilds: Int? = nil) { + let options = Options(filteremail: filteremail, filterfirstName: filterfirstName, filterinviteType: filterinviteType, filterlastName: filterlastName, filterapps: filterapps, filterbetaGroups: filterbetaGroups, filterbuilds: filterbuilds, sort: sort, fieldsbetaTesters: fieldsbetaTesters, limit: limit, include: include, fieldsbetaGroups: fieldsbetaGroups, fieldsbuilds: fieldsbuilds, fieldsapps: fieldsapps, limitapps: limitapps, limitbetaGroups: limitbetaGroups, limitbuilds: limitbuilds) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filteremail = options.filteremail?.joined(separator: ",") { + params["filter[email]"] = filteremail + } + if let filterfirstName = options.filterfirstName?.joined(separator: ",") { + params["filter[firstName]"] = filterfirstName + } + if let filterinviteType = options.filterinviteType?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[inviteType]"] = filterinviteType + } + if let filterlastName = options.filterlastName?.joined(separator: ",") { + params["filter[lastName]"] = filterlastName + } + if let filterapps = options.filterapps?.joined(separator: ",") { + params["filter[apps]"] = filterapps + } + if let filterbetaGroups = options.filterbetaGroups?.joined(separator: ",") { + params["filter[betaGroups]"] = filterbetaGroups + } + if let filterbuilds = options.filterbuilds?.joined(separator: ",") { + params["filter[builds]"] = filterbuilds + } + if let sort = options.sort?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["sort"] = sort + } + if let fieldsbetaTesters = options.fieldsbetaTesters?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaTesters]"] = fieldsbetaTesters + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbetaGroups = options.fieldsbetaGroups?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaGroups]"] = fieldsbetaGroups + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limitapps = options.limitapps { + params["limit[apps]"] = limitapps + } + if let limitbetaGroups = options.limitbetaGroups { + params["limit[betaGroups]"] = limitbetaGroups + } + if let limitbuilds = options.limitbuilds { + params["limit[builds]"] = limitbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaTestersResponse + + /** List of BetaTesters */ + case status200(BetaTestersResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: BetaTestersResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaTestersResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersGetInstance.swift new file mode 100644 index 000000000..c10f7fc58 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersGetInstance.swift @@ -0,0 +1,283 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BetaTesters { + + public enum BetaTestersGetInstance { + + public static let service = APIService(id: "betaTesters-get_instance", tag: "BetaTesters", method: "GET", path: "/v1/betaTesters/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaTesters */ + public enum FieldsbetaTesters: String, Codable, Equatable, CaseIterable { + case apps = "apps" + case betaGroups = "betaGroups" + case builds = "builds" + case email = "email" + case firstName = "firstName" + case inviteType = "inviteType" + case lastName = "lastName" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case apps = "apps" + case betaGroups = "betaGroups" + case builds = "builds" + } + + /** the fields to include for returned resources of type betaGroups */ + public enum FieldsbetaGroups: String, Codable, Equatable, CaseIterable { + case app = "app" + case betaTesters = "betaTesters" + case builds = "builds" + case createdDate = "createdDate" + case feedbackEnabled = "feedbackEnabled" + case isInternalGroup = "isInternalGroup" + case name = "name" + case publicLink = "publicLink" + case publicLinkEnabled = "publicLinkEnabled" + case publicLinkId = "publicLinkId" + case publicLinkLimit = "publicLinkLimit" + case publicLinkLimitEnabled = "publicLinkLimitEnabled" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaTesters */ + public var fieldsbetaTesters: [FieldsbetaTesters]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type betaGroups */ + public var fieldsbetaGroups: [FieldsbetaGroups]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum number of related apps returned (when they are included) */ + public var limitapps: Int? + + /** maximum number of related betaGroups returned (when they are included) */ + public var limitbetaGroups: Int? + + /** maximum number of related builds returned (when they are included) */ + public var limitbuilds: Int? + + public init(id: String, fieldsbetaTesters: [FieldsbetaTesters]? = nil, include: [Include]? = nil, fieldsbetaGroups: [FieldsbetaGroups]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsapps: [Fieldsapps]? = nil, limitapps: Int? = nil, limitbetaGroups: Int? = nil, limitbuilds: Int? = nil) { + self.id = id + self.fieldsbetaTesters = fieldsbetaTesters + self.include = include + self.fieldsbetaGroups = fieldsbetaGroups + self.fieldsbuilds = fieldsbuilds + self.fieldsapps = fieldsapps + self.limitapps = limitapps + self.limitbetaGroups = limitbetaGroups + self.limitbuilds = limitbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BetaTestersGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaTesters: [FieldsbetaTesters]? = nil, include: [Include]? = nil, fieldsbetaGroups: [FieldsbetaGroups]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsapps: [Fieldsapps]? = nil, limitapps: Int? = nil, limitbetaGroups: Int? = nil, limitbuilds: Int? = nil) { + let options = Options(id: id, fieldsbetaTesters: fieldsbetaTesters, include: include, fieldsbetaGroups: fieldsbetaGroups, fieldsbuilds: fieldsbuilds, fieldsapps: fieldsapps, limitapps: limitapps, limitbetaGroups: limitbetaGroups, limitbuilds: limitbuilds) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaTesters = options.fieldsbetaTesters?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaTesters]"] = fieldsbetaTesters + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbetaGroups = options.fieldsbetaGroups?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaGroups]"] = fieldsbetaGroups + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limitapps = options.limitapps { + params["limit[apps]"] = limitapps + } + if let limitbetaGroups = options.limitbetaGroups { + params["limit[betaGroups]"] = limitbetaGroups + } + if let limitbuilds = options.limitbuilds { + params["limit[builds]"] = limitbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaTesterResponse + + /** Single BetaTester */ + case status200(BetaTesterResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaTesterResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaTesterResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsBuildGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsBuildGetToOneRelated.swift new file mode 100644 index 000000000..b801022d8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsBuildGetToOneRelated.swift @@ -0,0 +1,173 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BuildBetaDetails { + + public enum BuildBetaDetailsBuildGetToOneRelated { + + public static let service = APIService(id: "buildBetaDetails-build-get_to_one_related", tag: "BuildBetaDetails", method: "GET", path: "/v1/buildBetaDetails/{id}/build", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + public init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil) { + self.id = id + self.fieldsbuilds = fieldsbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildBetaDetailsBuildGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil) { + let options = Options(id: id, fieldsbuilds: fieldsbuilds) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildResponse + + /** Related resource */ + case status200(BuildResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BuildResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsGetCollection.swift new file mode 100644 index 000000000..f6aaf57da --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsGetCollection.swift @@ -0,0 +1,205 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BuildBetaDetails { + + public enum BuildBetaDetailsGetCollection { + + public static let service = APIService(id: "buildBetaDetails-get_collection", tag: "BuildBetaDetails", method: "GET", path: "/v1/buildBetaDetails", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type buildBetaDetails */ + public enum FieldsbuildBetaDetails: String, Codable, Equatable, CaseIterable { + case autoNotifyEnabled = "autoNotifyEnabled" + case build = "build" + case externalBuildState = "externalBuildState" + case internalBuildState = "internalBuildState" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case build = "build" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by id(s) of related 'build' */ + public var filterbuild: [String]? + + /** filter by id(s) */ + public var filterid: [String]? + + /** the fields to include for returned resources of type buildBetaDetails */ + public var fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + public init(filterbuild: [String]? = nil, filterid: [String]? = nil, fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil) { + self.filterbuild = filterbuild + self.filterid = filterid + self.fieldsbuildBetaDetails = fieldsbuildBetaDetails + self.limit = limit + self.include = include + self.fieldsbuilds = fieldsbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildBetaDetailsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterbuild: [String]? = nil, filterid: [String]? = nil, fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil) { + let options = Options(filterbuild: filterbuild, filterid: filterid, fieldsbuildBetaDetails: fieldsbuildBetaDetails, limit: limit, include: include, fieldsbuilds: fieldsbuilds) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterbuild = options.filterbuild?.joined(separator: ",") { + params["filter[build]"] = filterbuild + } + if let filterid = options.filterid?.joined(separator: ",") { + params["filter[id]"] = filterid + } + if let fieldsbuildBetaDetails = options.fieldsbuildBetaDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[buildBetaDetails]"] = fieldsbuildBetaDetails + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildBetaDetailsResponse + + /** List of BuildBetaDetails */ + case status200(BuildBetaDetailsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: BuildBetaDetailsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildBetaDetailsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsGetInstance.swift new file mode 100644 index 000000000..b58850073 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsGetInstance.swift @@ -0,0 +1,200 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BuildBetaDetails { + + public enum BuildBetaDetailsGetInstance { + + public static let service = APIService(id: "buildBetaDetails-get_instance", tag: "BuildBetaDetails", method: "GET", path: "/v1/buildBetaDetails/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type buildBetaDetails */ + public enum FieldsbuildBetaDetails: String, Codable, Equatable, CaseIterable { + case autoNotifyEnabled = "autoNotifyEnabled" + case build = "build" + case externalBuildState = "externalBuildState" + case internalBuildState = "internalBuildState" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case build = "build" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type buildBetaDetails */ + public var fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + public init(id: String, fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil) { + self.id = id + self.fieldsbuildBetaDetails = fieldsbuildBetaDetails + self.include = include + self.fieldsbuilds = fieldsbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildBetaDetailsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil) { + let options = Options(id: id, fieldsbuildBetaDetails: fieldsbuildBetaDetails, include: include, fieldsbuilds: fieldsbuilds) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbuildBetaDetails = options.fieldsbuildBetaDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[buildBetaDetails]"] = fieldsbuildBetaDetails + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildBetaDetailResponse + + /** Single BuildBetaDetail */ + case status200(BuildBetaDetailResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BuildBetaDetailResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildBetaDetailResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsUpdateInstance.swift new file mode 100644 index 000000000..584785421 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaDetails/BuildBetaDetailsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BuildBetaDetails { + + public enum BuildBetaDetailsUpdateInstance { + + public static let service = APIService(id: "buildBetaDetails-update_instance", tag: "BuildBetaDetails", method: "PATCH", path: "/v1/buildBetaDetails/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BuildBetaDetailUpdateRequest + + public init(body: BuildBetaDetailUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BuildBetaDetailsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BuildBetaDetailUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildBetaDetailResponse + + /** Single BuildBetaDetail */ + case status200(BuildBetaDetailResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BuildBetaDetailResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildBetaDetailResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaNotifications/BuildBetaNotificationsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaNotifications/BuildBetaNotificationsCreateInstance.swift new file mode 100644 index 000000000..8a98f7104 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BuildBetaNotifications/BuildBetaNotificationsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BuildBetaNotifications { + + public enum BuildBetaNotificationsCreateInstance { + + public static let service = APIService(id: "buildBetaNotifications-create_instance", tag: "BuildBetaNotifications", method: "POST", path: "/v1/buildBetaNotifications", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: BuildBetaNotificationCreateRequest + + public init(body: BuildBetaNotificationCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: BuildBetaNotificationsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildBetaNotificationResponse + + /** Single BuildBetaNotification */ + case status201(BuildBetaNotificationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BuildBetaNotificationResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(BuildBetaNotificationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppEncryptionDeclarationGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppEncryptionDeclarationGetToOneRelated.swift new file mode 100644 index 000000000..5309f736c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppEncryptionDeclarationGetToOneRelated.swift @@ -0,0 +1,167 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsAppEncryptionDeclarationGetToOneRelated { + + public static let service = APIService(id: "builds-appEncryptionDeclaration-get_to_one_related", tag: "Builds", method: "GET", path: "/v1/builds/{id}/appEncryptionDeclaration", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appEncryptionDeclarations */ + public enum FieldsappEncryptionDeclarations: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclarationState = "appEncryptionDeclarationState" + case availableOnFrenchStore = "availableOnFrenchStore" + case builds = "builds" + case codeValue = "codeValue" + case containsProprietaryCryptography = "containsProprietaryCryptography" + case containsThirdPartyCryptography = "containsThirdPartyCryptography" + case documentName = "documentName" + case documentType = "documentType" + case documentUrl = "documentUrl" + case exempt = "exempt" + case platform = "platform" + case uploadedDate = "uploadedDate" + case usesEncryption = "usesEncryption" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appEncryptionDeclarations */ + public var fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? + + public init(id: String, fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? = nil) { + self.id = id + self.fieldsappEncryptionDeclarations = fieldsappEncryptionDeclarations + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsAppEncryptionDeclarationGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? = nil) { + let options = Options(id: id, fieldsappEncryptionDeclarations: fieldsappEncryptionDeclarations) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappEncryptionDeclarations = options.fieldsappEncryptionDeclarations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appEncryptionDeclarations]"] = fieldsappEncryptionDeclarations + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppEncryptionDeclarationResponse + + /** Related resource */ + case status200(AppEncryptionDeclarationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppEncryptionDeclarationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppEncryptionDeclarationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppEncryptionDeclarationGetToOneRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppEncryptionDeclarationGetToOneRelationship.swift new file mode 100644 index 000000000..4897a9b6c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppEncryptionDeclarationGetToOneRelationship.swift @@ -0,0 +1,137 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsAppEncryptionDeclarationGetToOneRelationship { + + public static let service = APIService(id: "builds-appEncryptionDeclaration-get_to_one_relationship", tag: "Builds", method: "GET", path: "/v1/builds/{id}/relationships/appEncryptionDeclaration", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsAppEncryptionDeclarationGetToOneRelationship.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildAppEncryptionDeclarationLinkageResponse + + /** Related linkage */ + case status200(BuildAppEncryptionDeclarationLinkageResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BuildAppEncryptionDeclarationLinkageResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildAppEncryptionDeclarationLinkageResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppEncryptionDeclarationUpdateToOneRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppEncryptionDeclarationUpdateToOneRelationship.swift new file mode 100644 index 000000000..0cc99b2ab --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppEncryptionDeclarationUpdateToOneRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsAppEncryptionDeclarationUpdateToOneRelationship { + + public static let service = APIService(id: "builds-appEncryptionDeclaration-update_to_one_relationship", tag: "Builds", method: "PATCH", path: "/v1/builds/{id}/relationships/appEncryptionDeclaration", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BuildAppEncryptionDeclarationLinkageRequest + + public init(body: BuildAppEncryptionDeclarationLinkageRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BuildsAppEncryptionDeclarationUpdateToOneRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BuildAppEncryptionDeclarationLinkageRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppGetToOneRelated.swift new file mode 100644 index 000000000..3e33a9e32 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppGetToOneRelated.swift @@ -0,0 +1,176 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsAppGetToOneRelated { + + public static let service = APIService(id: "builds-app-get_to_one_related", tag: "Builds", method: "GET", path: "/v1/builds/{id}/app", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(id: String, fieldsapps: [Fieldsapps]? = nil) { + self.id = id + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsAppGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(id: id, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppResponse + + /** Related resource */ + case status200(AppResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppStoreVersionGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppStoreVersionGetToOneRelated.swift new file mode 100644 index 000000000..e3c2fe283 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsAppStoreVersionGetToOneRelated.swift @@ -0,0 +1,171 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsAppStoreVersionGetToOneRelated { + + public static let service = APIService(id: "builds-appStoreVersion-get_to_one_related", tag: "Builds", method: "GET", path: "/v1/builds/{id}/appStoreVersion", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type appStoreVersions */ + public enum FieldsappStoreVersions: String, Codable, Equatable, CaseIterable { + case ageRatingDeclaration = "ageRatingDeclaration" + case app = "app" + case appStoreReviewDetail = "appStoreReviewDetail" + case appStoreState = "appStoreState" + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + case appStoreVersionPhasedRelease = "appStoreVersionPhasedRelease" + case appStoreVersionSubmission = "appStoreVersionSubmission" + case build = "build" + case copyright = "copyright" + case createdDate = "createdDate" + case downloadable = "downloadable" + case earliestReleaseDate = "earliestReleaseDate" + case idfaDeclaration = "idfaDeclaration" + case platform = "platform" + case releaseType = "releaseType" + case routingAppCoverage = "routingAppCoverage" + case usesIdfa = "usesIdfa" + case versionString = "versionString" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type appStoreVersions */ + public var fieldsappStoreVersions: [FieldsappStoreVersions]? + + public init(id: String, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil) { + self.id = id + self.fieldsappStoreVersions = fieldsappStoreVersions + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsAppStoreVersionGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil) { + let options = Options(id: id, fieldsappStoreVersions: fieldsappStoreVersions) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsappStoreVersions = options.fieldsappStoreVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersions]"] = fieldsappStoreVersions + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppStoreVersionResponse + + /** Related resource */ + case status200(AppStoreVersionResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppStoreVersionResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppStoreVersionResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaAppReviewSubmissionGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaAppReviewSubmissionGetToOneRelated.swift new file mode 100644 index 000000000..7ba9d31d1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaAppReviewSubmissionGetToOneRelated.swift @@ -0,0 +1,155 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsBetaAppReviewSubmissionGetToOneRelated { + + public static let service = APIService(id: "builds-betaAppReviewSubmission-get_to_one_related", tag: "Builds", method: "GET", path: "/v1/builds/{id}/betaAppReviewSubmission", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaAppReviewSubmissions */ + public enum FieldsbetaAppReviewSubmissions: String, Codable, Equatable, CaseIterable { + case betaReviewState = "betaReviewState" + case build = "build" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaAppReviewSubmissions */ + public var fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? + + public init(id: String, fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? = nil) { + self.id = id + self.fieldsbetaAppReviewSubmissions = fieldsbetaAppReviewSubmissions + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsBetaAppReviewSubmissionGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? = nil) { + let options = Options(id: id, fieldsbetaAppReviewSubmissions: fieldsbetaAppReviewSubmissions) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaAppReviewSubmissions = options.fieldsbetaAppReviewSubmissions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppReviewSubmissions]"] = fieldsbetaAppReviewSubmissions + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaAppReviewSubmissionResponse + + /** Related resource */ + case status200(BetaAppReviewSubmissionResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaAppReviewSubmissionResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaAppReviewSubmissionResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaBuildLocalizationsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaBuildLocalizationsGetToManyRelated.swift new file mode 100644 index 000000000..60ffa8d3a --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaBuildLocalizationsGetToManyRelated.swift @@ -0,0 +1,163 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsBetaBuildLocalizationsGetToManyRelated { + + public static let service = APIService(id: "builds-betaBuildLocalizations-get_to_many_related", tag: "Builds", method: "GET", path: "/v1/builds/{id}/betaBuildLocalizations", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaBuildLocalizations */ + public enum FieldsbetaBuildLocalizations: String, Codable, Equatable, CaseIterable { + case build = "build" + case locale = "locale" + case whatsNew = "whatsNew" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaBuildLocalizations */ + public var fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsbetaBuildLocalizations = fieldsbetaBuildLocalizations + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsBetaBuildLocalizationsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsbetaBuildLocalizations: fieldsbetaBuildLocalizations, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaBuildLocalizations = options.fieldsbetaBuildLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaBuildLocalizations]"] = fieldsbetaBuildLocalizations + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaBuildLocalizationsResponse + + /** List of related resources */ + case status200(BetaBuildLocalizationsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaBuildLocalizationsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaBuildLocalizationsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaGroupsCreateToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaGroupsCreateToManyRelationship.swift new file mode 100644 index 000000000..4f3f91489 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaGroupsCreateToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsBetaGroupsCreateToManyRelationship { + + public static let service = APIService(id: "builds-betaGroups-create_to_many_relationship", tag: "Builds", method: "POST", path: "/v1/builds/{id}/relationships/betaGroups", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BuildBetaGroupsLinkagesRequest + + public init(body: BuildBetaGroupsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BuildsBetaGroupsCreateToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BuildBetaGroupsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaGroupsDeleteToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaGroupsDeleteToManyRelationship.swift new file mode 100644 index 000000000..8abd08eb5 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBetaGroupsDeleteToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsBetaGroupsDeleteToManyRelationship { + + public static let service = APIService(id: "builds-betaGroups-delete_to_many_relationship", tag: "Builds", method: "DELETE", path: "/v1/builds/{id}/relationships/betaGroups", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BuildBetaGroupsLinkagesRequest + + public init(body: BuildBetaGroupsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BuildsBetaGroupsDeleteToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BuildBetaGroupsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBuildBetaDetailGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBuildBetaDetailGetToOneRelated.swift new file mode 100644 index 000000000..4999aebea --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsBuildBetaDetailGetToOneRelated.swift @@ -0,0 +1,157 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsBuildBetaDetailGetToOneRelated { + + public static let service = APIService(id: "builds-buildBetaDetail-get_to_one_related", tag: "Builds", method: "GET", path: "/v1/builds/{id}/buildBetaDetail", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type buildBetaDetails */ + public enum FieldsbuildBetaDetails: String, Codable, Equatable, CaseIterable { + case autoNotifyEnabled = "autoNotifyEnabled" + case build = "build" + case externalBuildState = "externalBuildState" + case internalBuildState = "internalBuildState" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type buildBetaDetails */ + public var fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? + + public init(id: String, fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? = nil) { + self.id = id + self.fieldsbuildBetaDetails = fieldsbuildBetaDetails + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsBuildBetaDetailGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? = nil) { + let options = Options(id: id, fieldsbuildBetaDetails: fieldsbuildBetaDetails) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbuildBetaDetails = options.fieldsbuildBetaDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[buildBetaDetails]"] = fieldsbuildBetaDetails + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildBetaDetailResponse + + /** Related resource */ + case status200(BuildBetaDetailResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BuildBetaDetailResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildBetaDetailResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsDiagnosticSignaturesGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsDiagnosticSignaturesGetToManyRelated.swift new file mode 100644 index 000000000..7ec89d3ac --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsDiagnosticSignaturesGetToManyRelated.swift @@ -0,0 +1,176 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsDiagnosticSignaturesGetToManyRelated { + + public static let service = APIService(id: "builds-diagnosticSignatures-get_to_many_related", tag: "Builds", method: "GET", path: "/v1/builds/{id}/diagnosticSignatures", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'diagnosticType' */ + public enum FilterdiagnosticType: String, Codable, Equatable, CaseIterable { + case diskWrites = "DISK_WRITES" + } + + /** the fields to include for returned resources of type diagnosticSignatures */ + public enum FieldsdiagnosticSignatures: String, Codable, Equatable, CaseIterable { + case diagnosticType = "diagnosticType" + case logs = "logs" + case signature = "signature" + case weight = "weight" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** filter by attribute 'diagnosticType' */ + public var filterdiagnosticType: [FilterdiagnosticType]? + + /** the fields to include for returned resources of type diagnosticSignatures */ + public var fieldsdiagnosticSignatures: [FieldsdiagnosticSignatures]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, filterdiagnosticType: [FilterdiagnosticType]? = nil, fieldsdiagnosticSignatures: [FieldsdiagnosticSignatures]? = nil, limit: Int? = nil) { + self.id = id + self.filterdiagnosticType = filterdiagnosticType + self.fieldsdiagnosticSignatures = fieldsdiagnosticSignatures + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsDiagnosticSignaturesGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, filterdiagnosticType: [FilterdiagnosticType]? = nil, fieldsdiagnosticSignatures: [FieldsdiagnosticSignatures]? = nil, limit: Int? = nil) { + let options = Options(id: id, filterdiagnosticType: filterdiagnosticType, fieldsdiagnosticSignatures: fieldsdiagnosticSignatures, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterdiagnosticType = options.filterdiagnosticType?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[diagnosticType]"] = filterdiagnosticType + } + if let fieldsdiagnosticSignatures = options.fieldsdiagnosticSignatures?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[diagnosticSignatures]"] = fieldsdiagnosticSignatures + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = DiagnosticSignaturesResponse + + /** List of related resources */ + case status200(DiagnosticSignaturesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: DiagnosticSignaturesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(DiagnosticSignaturesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsGetCollection.swift new file mode 100644 index 000000000..1ac7136b2 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsGetCollection.swift @@ -0,0 +1,534 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsGetCollection { + + public static let service = APIService(id: "builds-get_collection", tag: "Builds", method: "GET", path: "/v1/builds", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'betaAppReviewSubmission.betaReviewState' */ + public enum FilterbetaAppReviewSubmissionBetaReviewState: String, Codable, Equatable, CaseIterable { + case waitingForReview = "WAITING_FOR_REVIEW" + case inReview = "IN_REVIEW" + case rejected = "REJECTED" + case approved = "APPROVED" + } + + /** filter by attribute 'preReleaseVersion.platform' */ + public enum FilterpreReleaseVersionPlatform: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + case macOs = "MAC_OS" + case tvOs = "TV_OS" + } + + /** filter by attribute 'processingState' */ + public enum FilterprocessingState: String, Codable, Equatable, CaseIterable { + case processing = "PROCESSING" + case failed = "FAILED" + case invalid = "INVALID" + case valid = "VALID" + } + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public enum Sort: String, Codable, Equatable, CaseIterable { + case preReleaseVersion = "preReleaseVersion" + case preReleaseVersion = "-preReleaseVersion" + case uploadedDate = "uploadedDate" + case uploadedDate = "-uploadedDate" + case version = "version" + case version = "-version" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case buildBetaDetail = "buildBetaDetail" + case icons = "icons" + case individualTesters = "individualTesters" + case preReleaseVersion = "preReleaseVersion" + } + + /** the fields to include for returned resources of type appEncryptionDeclarations */ + public enum FieldsappEncryptionDeclarations: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclarationState = "appEncryptionDeclarationState" + case availableOnFrenchStore = "availableOnFrenchStore" + case builds = "builds" + case codeValue = "codeValue" + case containsProprietaryCryptography = "containsProprietaryCryptography" + case containsThirdPartyCryptography = "containsThirdPartyCryptography" + case documentName = "documentName" + case documentType = "documentType" + case documentUrl = "documentUrl" + case exempt = "exempt" + case platform = "platform" + case uploadedDate = "uploadedDate" + case usesEncryption = "usesEncryption" + } + + /** the fields to include for returned resources of type betaAppReviewSubmissions */ + public enum FieldsbetaAppReviewSubmissions: String, Codable, Equatable, CaseIterable { + case betaReviewState = "betaReviewState" + case build = "build" + } + + /** the fields to include for returned resources of type buildBetaDetails */ + public enum FieldsbuildBetaDetails: String, Codable, Equatable, CaseIterable { + case autoNotifyEnabled = "autoNotifyEnabled" + case build = "build" + case externalBuildState = "externalBuildState" + case internalBuildState = "internalBuildState" + } + + /** the fields to include for returned resources of type buildIcons */ + public enum FieldsbuildIcons: String, Codable, Equatable, CaseIterable { + case iconAsset = "iconAsset" + case iconType = "iconType" + } + + /** the fields to include for returned resources of type perfPowerMetrics */ + public enum FieldsperfPowerMetrics: String, Codable, Equatable, CaseIterable { + case deviceType = "deviceType" + case metricType = "metricType" + case platform = "platform" + } + + /** the fields to include for returned resources of type preReleaseVersions */ + public enum FieldspreReleaseVersions: String, Codable, Equatable, CaseIterable { + case app = "app" + case builds = "builds" + case platform = "platform" + case version = "version" + } + + /** the fields to include for returned resources of type appStoreVersions */ + public enum FieldsappStoreVersions: String, Codable, Equatable, CaseIterable { + case ageRatingDeclaration = "ageRatingDeclaration" + case app = "app" + case appStoreReviewDetail = "appStoreReviewDetail" + case appStoreState = "appStoreState" + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + case appStoreVersionPhasedRelease = "appStoreVersionPhasedRelease" + case appStoreVersionSubmission = "appStoreVersionSubmission" + case build = "build" + case copyright = "copyright" + case createdDate = "createdDate" + case downloadable = "downloadable" + case earliestReleaseDate = "earliestReleaseDate" + case idfaDeclaration = "idfaDeclaration" + case platform = "platform" + case releaseType = "releaseType" + case routingAppCoverage = "routingAppCoverage" + case usesIdfa = "usesIdfa" + case versionString = "versionString" + } + + /** the fields to include for returned resources of type diagnosticSignatures */ + public enum FieldsdiagnosticSignatures: String, Codable, Equatable, CaseIterable { + case diagnosticType = "diagnosticType" + case logs = "logs" + case signature = "signature" + case weight = "weight" + } + + /** the fields to include for returned resources of type betaTesters */ + public enum FieldsbetaTesters: String, Codable, Equatable, CaseIterable { + case apps = "apps" + case betaGroups = "betaGroups" + case builds = "builds" + case email = "email" + case firstName = "firstName" + case inviteType = "inviteType" + case lastName = "lastName" + } + + /** the fields to include for returned resources of type betaBuildLocalizations */ + public enum FieldsbetaBuildLocalizations: String, Codable, Equatable, CaseIterable { + case build = "build" + case locale = "locale" + case whatsNew = "whatsNew" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'betaAppReviewSubmission.betaReviewState' */ + public var filterbetaAppReviewSubmissionBetaReviewState: [FilterbetaAppReviewSubmissionBetaReviewState]? + + /** filter by attribute 'expired' */ + public var filterexpired: [String]? + + /** filter by attribute 'preReleaseVersion.platform' */ + public var filterpreReleaseVersionPlatform: [FilterpreReleaseVersionPlatform]? + + /** filter by attribute 'preReleaseVersion.version' */ + public var filterpreReleaseVersionVersion: [String]? + + /** filter by attribute 'processingState' */ + public var filterprocessingState: [FilterprocessingState]? + + /** filter by attribute 'usesNonExemptEncryption' */ + public var filterusesNonExemptEncryption: [String]? + + /** filter by attribute 'version' */ + public var filterversion: [String]? + + /** filter by id(s) of related 'app' */ + public var filterapp: [String]? + + /** filter by id(s) of related 'appStoreVersion' */ + public var filterappStoreVersion: [String]? + + /** filter by id(s) of related 'betaGroups' */ + public var filterbetaGroups: [String]? + + /** filter by id(s) of related 'preReleaseVersion' */ + public var filterpreReleaseVersion: [String]? + + /** filter by id(s) */ + public var filterid: [String]? + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public var sort: [Sort]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type appEncryptionDeclarations */ + public var fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? + + /** the fields to include for returned resources of type betaAppReviewSubmissions */ + public var fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? + + /** the fields to include for returned resources of type buildBetaDetails */ + public var fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? + + /** the fields to include for returned resources of type buildIcons */ + public var fieldsbuildIcons: [FieldsbuildIcons]? + + /** the fields to include for returned resources of type perfPowerMetrics */ + public var fieldsperfPowerMetrics: [FieldsperfPowerMetrics]? + + /** the fields to include for returned resources of type preReleaseVersions */ + public var fieldspreReleaseVersions: [FieldspreReleaseVersions]? + + /** the fields to include for returned resources of type appStoreVersions */ + public var fieldsappStoreVersions: [FieldsappStoreVersions]? + + /** the fields to include for returned resources of type diagnosticSignatures */ + public var fieldsdiagnosticSignatures: [FieldsdiagnosticSignatures]? + + /** the fields to include for returned resources of type betaTesters */ + public var fieldsbetaTesters: [FieldsbetaTesters]? + + /** the fields to include for returned resources of type betaBuildLocalizations */ + public var fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum number of related betaBuildLocalizations returned (when they are included) */ + public var limitbetaBuildLocalizations: Int? + + /** maximum number of related icons returned (when they are included) */ + public var limiticons: Int? + + /** maximum number of related individualTesters returned (when they are included) */ + public var limitindividualTesters: Int? + + public init(filterbetaAppReviewSubmissionBetaReviewState: [FilterbetaAppReviewSubmissionBetaReviewState]? = nil, filterexpired: [String]? = nil, filterpreReleaseVersionPlatform: [FilterpreReleaseVersionPlatform]? = nil, filterpreReleaseVersionVersion: [String]? = nil, filterprocessingState: [FilterprocessingState]? = nil, filterusesNonExemptEncryption: [String]? = nil, filterversion: [String]? = nil, filterapp: [String]? = nil, filterappStoreVersion: [String]? = nil, filterbetaGroups: [String]? = nil, filterpreReleaseVersion: [String]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? = nil, fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? = nil, fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? = nil, fieldsbuildIcons: [FieldsbuildIcons]? = nil, fieldsperfPowerMetrics: [FieldsperfPowerMetrics]? = nil, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, fieldsdiagnosticSignatures: [FieldsdiagnosticSignatures]? = nil, fieldsbetaTesters: [FieldsbetaTesters]? = nil, fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbetaBuildLocalizations: Int? = nil, limiticons: Int? = nil, limitindividualTesters: Int? = nil) { + self.filterbetaAppReviewSubmissionBetaReviewState = filterbetaAppReviewSubmissionBetaReviewState + self.filterexpired = filterexpired + self.filterpreReleaseVersionPlatform = filterpreReleaseVersionPlatform + self.filterpreReleaseVersionVersion = filterpreReleaseVersionVersion + self.filterprocessingState = filterprocessingState + self.filterusesNonExemptEncryption = filterusesNonExemptEncryption + self.filterversion = filterversion + self.filterapp = filterapp + self.filterappStoreVersion = filterappStoreVersion + self.filterbetaGroups = filterbetaGroups + self.filterpreReleaseVersion = filterpreReleaseVersion + self.filterid = filterid + self.sort = sort + self.fieldsbuilds = fieldsbuilds + self.limit = limit + self.include = include + self.fieldsappEncryptionDeclarations = fieldsappEncryptionDeclarations + self.fieldsbetaAppReviewSubmissions = fieldsbetaAppReviewSubmissions + self.fieldsbuildBetaDetails = fieldsbuildBetaDetails + self.fieldsbuildIcons = fieldsbuildIcons + self.fieldsperfPowerMetrics = fieldsperfPowerMetrics + self.fieldspreReleaseVersions = fieldspreReleaseVersions + self.fieldsappStoreVersions = fieldsappStoreVersions + self.fieldsdiagnosticSignatures = fieldsdiagnosticSignatures + self.fieldsbetaTesters = fieldsbetaTesters + self.fieldsbetaBuildLocalizations = fieldsbetaBuildLocalizations + self.fieldsapps = fieldsapps + self.limitbetaBuildLocalizations = limitbetaBuildLocalizations + self.limiticons = limiticons + self.limitindividualTesters = limitindividualTesters + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterbetaAppReviewSubmissionBetaReviewState: [FilterbetaAppReviewSubmissionBetaReviewState]? = nil, filterexpired: [String]? = nil, filterpreReleaseVersionPlatform: [FilterpreReleaseVersionPlatform]? = nil, filterpreReleaseVersionVersion: [String]? = nil, filterprocessingState: [FilterprocessingState]? = nil, filterusesNonExemptEncryption: [String]? = nil, filterversion: [String]? = nil, filterapp: [String]? = nil, filterappStoreVersion: [String]? = nil, filterbetaGroups: [String]? = nil, filterpreReleaseVersion: [String]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? = nil, fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? = nil, fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? = nil, fieldsbuildIcons: [FieldsbuildIcons]? = nil, fieldsperfPowerMetrics: [FieldsperfPowerMetrics]? = nil, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, fieldsdiagnosticSignatures: [FieldsdiagnosticSignatures]? = nil, fieldsbetaTesters: [FieldsbetaTesters]? = nil, fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbetaBuildLocalizations: Int? = nil, limiticons: Int? = nil, limitindividualTesters: Int? = nil) { + let options = Options(filterbetaAppReviewSubmissionBetaReviewState: filterbetaAppReviewSubmissionBetaReviewState, filterexpired: filterexpired, filterpreReleaseVersionPlatform: filterpreReleaseVersionPlatform, filterpreReleaseVersionVersion: filterpreReleaseVersionVersion, filterprocessingState: filterprocessingState, filterusesNonExemptEncryption: filterusesNonExemptEncryption, filterversion: filterversion, filterapp: filterapp, filterappStoreVersion: filterappStoreVersion, filterbetaGroups: filterbetaGroups, filterpreReleaseVersion: filterpreReleaseVersion, filterid: filterid, sort: sort, fieldsbuilds: fieldsbuilds, limit: limit, include: include, fieldsappEncryptionDeclarations: fieldsappEncryptionDeclarations, fieldsbetaAppReviewSubmissions: fieldsbetaAppReviewSubmissions, fieldsbuildBetaDetails: fieldsbuildBetaDetails, fieldsbuildIcons: fieldsbuildIcons, fieldsperfPowerMetrics: fieldsperfPowerMetrics, fieldspreReleaseVersions: fieldspreReleaseVersions, fieldsappStoreVersions: fieldsappStoreVersions, fieldsdiagnosticSignatures: fieldsdiagnosticSignatures, fieldsbetaTesters: fieldsbetaTesters, fieldsbetaBuildLocalizations: fieldsbetaBuildLocalizations, fieldsapps: fieldsapps, limitbetaBuildLocalizations: limitbetaBuildLocalizations, limiticons: limiticons, limitindividualTesters: limitindividualTesters) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterbetaAppReviewSubmissionBetaReviewState = options.filterbetaAppReviewSubmissionBetaReviewState?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[betaAppReviewSubmission.betaReviewState]"] = filterbetaAppReviewSubmissionBetaReviewState + } + if let filterexpired = options.filterexpired?.joined(separator: ",") { + params["filter[expired]"] = filterexpired + } + if let filterpreReleaseVersionPlatform = options.filterpreReleaseVersionPlatform?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[preReleaseVersion.platform]"] = filterpreReleaseVersionPlatform + } + if let filterpreReleaseVersionVersion = options.filterpreReleaseVersionVersion?.joined(separator: ",") { + params["filter[preReleaseVersion.version]"] = filterpreReleaseVersionVersion + } + if let filterprocessingState = options.filterprocessingState?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[processingState]"] = filterprocessingState + } + if let filterusesNonExemptEncryption = options.filterusesNonExemptEncryption?.joined(separator: ",") { + params["filter[usesNonExemptEncryption]"] = filterusesNonExemptEncryption + } + if let filterversion = options.filterversion?.joined(separator: ",") { + params["filter[version]"] = filterversion + } + if let filterapp = options.filterapp?.joined(separator: ",") { + params["filter[app]"] = filterapp + } + if let filterappStoreVersion = options.filterappStoreVersion?.joined(separator: ",") { + params["filter[appStoreVersion]"] = filterappStoreVersion + } + if let filterbetaGroups = options.filterbetaGroups?.joined(separator: ",") { + params["filter[betaGroups]"] = filterbetaGroups + } + if let filterpreReleaseVersion = options.filterpreReleaseVersion?.joined(separator: ",") { + params["filter[preReleaseVersion]"] = filterpreReleaseVersion + } + if let filterid = options.filterid?.joined(separator: ",") { + params["filter[id]"] = filterid + } + if let sort = options.sort?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["sort"] = sort + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsappEncryptionDeclarations = options.fieldsappEncryptionDeclarations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appEncryptionDeclarations]"] = fieldsappEncryptionDeclarations + } + if let fieldsbetaAppReviewSubmissions = options.fieldsbetaAppReviewSubmissions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppReviewSubmissions]"] = fieldsbetaAppReviewSubmissions + } + if let fieldsbuildBetaDetails = options.fieldsbuildBetaDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[buildBetaDetails]"] = fieldsbuildBetaDetails + } + if let fieldsbuildIcons = options.fieldsbuildIcons?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[buildIcons]"] = fieldsbuildIcons + } + if let fieldsperfPowerMetrics = options.fieldsperfPowerMetrics?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[perfPowerMetrics]"] = fieldsperfPowerMetrics + } + if let fieldspreReleaseVersions = options.fieldspreReleaseVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[preReleaseVersions]"] = fieldspreReleaseVersions + } + if let fieldsappStoreVersions = options.fieldsappStoreVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersions]"] = fieldsappStoreVersions + } + if let fieldsdiagnosticSignatures = options.fieldsdiagnosticSignatures?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[diagnosticSignatures]"] = fieldsdiagnosticSignatures + } + if let fieldsbetaTesters = options.fieldsbetaTesters?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaTesters]"] = fieldsbetaTesters + } + if let fieldsbetaBuildLocalizations = options.fieldsbetaBuildLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaBuildLocalizations]"] = fieldsbetaBuildLocalizations + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limitbetaBuildLocalizations = options.limitbetaBuildLocalizations { + params["limit[betaBuildLocalizations]"] = limitbetaBuildLocalizations + } + if let limiticons = options.limiticons { + params["limit[icons]"] = limiticons + } + if let limitindividualTesters = options.limitindividualTesters { + params["limit[individualTesters]"] = limitindividualTesters + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildsResponse + + /** List of Builds */ + case status200(BuildsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: BuildsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsGetInstance.swift new file mode 100644 index 000000000..6a88bc746 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsGetInstance.swift @@ -0,0 +1,419 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsGetInstance { + + public static let service = APIService(id: "builds-get_instance", tag: "Builds", method: "GET", path: "/v1/builds/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case buildBetaDetail = "buildBetaDetail" + case icons = "icons" + case individualTesters = "individualTesters" + case preReleaseVersion = "preReleaseVersion" + } + + /** the fields to include for returned resources of type appEncryptionDeclarations */ + public enum FieldsappEncryptionDeclarations: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclarationState = "appEncryptionDeclarationState" + case availableOnFrenchStore = "availableOnFrenchStore" + case builds = "builds" + case codeValue = "codeValue" + case containsProprietaryCryptography = "containsProprietaryCryptography" + case containsThirdPartyCryptography = "containsThirdPartyCryptography" + case documentName = "documentName" + case documentType = "documentType" + case documentUrl = "documentUrl" + case exempt = "exempt" + case platform = "platform" + case uploadedDate = "uploadedDate" + case usesEncryption = "usesEncryption" + } + + /** the fields to include for returned resources of type betaAppReviewSubmissions */ + public enum FieldsbetaAppReviewSubmissions: String, Codable, Equatable, CaseIterable { + case betaReviewState = "betaReviewState" + case build = "build" + } + + /** the fields to include for returned resources of type buildBetaDetails */ + public enum FieldsbuildBetaDetails: String, Codable, Equatable, CaseIterable { + case autoNotifyEnabled = "autoNotifyEnabled" + case build = "build" + case externalBuildState = "externalBuildState" + case internalBuildState = "internalBuildState" + } + + /** the fields to include for returned resources of type buildIcons */ + public enum FieldsbuildIcons: String, Codable, Equatable, CaseIterable { + case iconAsset = "iconAsset" + case iconType = "iconType" + } + + /** the fields to include for returned resources of type perfPowerMetrics */ + public enum FieldsperfPowerMetrics: String, Codable, Equatable, CaseIterable { + case deviceType = "deviceType" + case metricType = "metricType" + case platform = "platform" + } + + /** the fields to include for returned resources of type preReleaseVersions */ + public enum FieldspreReleaseVersions: String, Codable, Equatable, CaseIterable { + case app = "app" + case builds = "builds" + case platform = "platform" + case version = "version" + } + + /** the fields to include for returned resources of type appStoreVersions */ + public enum FieldsappStoreVersions: String, Codable, Equatable, CaseIterable { + case ageRatingDeclaration = "ageRatingDeclaration" + case app = "app" + case appStoreReviewDetail = "appStoreReviewDetail" + case appStoreState = "appStoreState" + case appStoreVersionLocalizations = "appStoreVersionLocalizations" + case appStoreVersionPhasedRelease = "appStoreVersionPhasedRelease" + case appStoreVersionSubmission = "appStoreVersionSubmission" + case build = "build" + case copyright = "copyright" + case createdDate = "createdDate" + case downloadable = "downloadable" + case earliestReleaseDate = "earliestReleaseDate" + case idfaDeclaration = "idfaDeclaration" + case platform = "platform" + case releaseType = "releaseType" + case routingAppCoverage = "routingAppCoverage" + case usesIdfa = "usesIdfa" + case versionString = "versionString" + } + + /** the fields to include for returned resources of type diagnosticSignatures */ + public enum FieldsdiagnosticSignatures: String, Codable, Equatable, CaseIterable { + case diagnosticType = "diagnosticType" + case logs = "logs" + case signature = "signature" + case weight = "weight" + } + + /** the fields to include for returned resources of type betaTesters */ + public enum FieldsbetaTesters: String, Codable, Equatable, CaseIterable { + case apps = "apps" + case betaGroups = "betaGroups" + case builds = "builds" + case email = "email" + case firstName = "firstName" + case inviteType = "inviteType" + case lastName = "lastName" + } + + /** the fields to include for returned resources of type betaBuildLocalizations */ + public enum FieldsbetaBuildLocalizations: String, Codable, Equatable, CaseIterable { + case build = "build" + case locale = "locale" + case whatsNew = "whatsNew" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type appEncryptionDeclarations */ + public var fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? + + /** the fields to include for returned resources of type betaAppReviewSubmissions */ + public var fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? + + /** the fields to include for returned resources of type buildBetaDetails */ + public var fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? + + /** the fields to include for returned resources of type buildIcons */ + public var fieldsbuildIcons: [FieldsbuildIcons]? + + /** the fields to include for returned resources of type perfPowerMetrics */ + public var fieldsperfPowerMetrics: [FieldsperfPowerMetrics]? + + /** the fields to include for returned resources of type preReleaseVersions */ + public var fieldspreReleaseVersions: [FieldspreReleaseVersions]? + + /** the fields to include for returned resources of type appStoreVersions */ + public var fieldsappStoreVersions: [FieldsappStoreVersions]? + + /** the fields to include for returned resources of type diagnosticSignatures */ + public var fieldsdiagnosticSignatures: [FieldsdiagnosticSignatures]? + + /** the fields to include for returned resources of type betaTesters */ + public var fieldsbetaTesters: [FieldsbetaTesters]? + + /** the fields to include for returned resources of type betaBuildLocalizations */ + public var fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum number of related betaBuildLocalizations returned (when they are included) */ + public var limitbetaBuildLocalizations: Int? + + /** maximum number of related icons returned (when they are included) */ + public var limiticons: Int? + + /** maximum number of related individualTesters returned (when they are included) */ + public var limitindividualTesters: Int? + + public init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil, include: [Include]? = nil, fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? = nil, fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? = nil, fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? = nil, fieldsbuildIcons: [FieldsbuildIcons]? = nil, fieldsperfPowerMetrics: [FieldsperfPowerMetrics]? = nil, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, fieldsdiagnosticSignatures: [FieldsdiagnosticSignatures]? = nil, fieldsbetaTesters: [FieldsbetaTesters]? = nil, fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbetaBuildLocalizations: Int? = nil, limiticons: Int? = nil, limitindividualTesters: Int? = nil) { + self.id = id + self.fieldsbuilds = fieldsbuilds + self.include = include + self.fieldsappEncryptionDeclarations = fieldsappEncryptionDeclarations + self.fieldsbetaAppReviewSubmissions = fieldsbetaAppReviewSubmissions + self.fieldsbuildBetaDetails = fieldsbuildBetaDetails + self.fieldsbuildIcons = fieldsbuildIcons + self.fieldsperfPowerMetrics = fieldsperfPowerMetrics + self.fieldspreReleaseVersions = fieldspreReleaseVersions + self.fieldsappStoreVersions = fieldsappStoreVersions + self.fieldsdiagnosticSignatures = fieldsdiagnosticSignatures + self.fieldsbetaTesters = fieldsbetaTesters + self.fieldsbetaBuildLocalizations = fieldsbetaBuildLocalizations + self.fieldsapps = fieldsapps + self.limitbetaBuildLocalizations = limitbetaBuildLocalizations + self.limiticons = limiticons + self.limitindividualTesters = limitindividualTesters + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil, include: [Include]? = nil, fieldsappEncryptionDeclarations: [FieldsappEncryptionDeclarations]? = nil, fieldsbetaAppReviewSubmissions: [FieldsbetaAppReviewSubmissions]? = nil, fieldsbuildBetaDetails: [FieldsbuildBetaDetails]? = nil, fieldsbuildIcons: [FieldsbuildIcons]? = nil, fieldsperfPowerMetrics: [FieldsperfPowerMetrics]? = nil, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil, fieldsappStoreVersions: [FieldsappStoreVersions]? = nil, fieldsdiagnosticSignatures: [FieldsdiagnosticSignatures]? = nil, fieldsbetaTesters: [FieldsbetaTesters]? = nil, fieldsbetaBuildLocalizations: [FieldsbetaBuildLocalizations]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbetaBuildLocalizations: Int? = nil, limiticons: Int? = nil, limitindividualTesters: Int? = nil) { + let options = Options(id: id, fieldsbuilds: fieldsbuilds, include: include, fieldsappEncryptionDeclarations: fieldsappEncryptionDeclarations, fieldsbetaAppReviewSubmissions: fieldsbetaAppReviewSubmissions, fieldsbuildBetaDetails: fieldsbuildBetaDetails, fieldsbuildIcons: fieldsbuildIcons, fieldsperfPowerMetrics: fieldsperfPowerMetrics, fieldspreReleaseVersions: fieldspreReleaseVersions, fieldsappStoreVersions: fieldsappStoreVersions, fieldsdiagnosticSignatures: fieldsdiagnosticSignatures, fieldsbetaTesters: fieldsbetaTesters, fieldsbetaBuildLocalizations: fieldsbetaBuildLocalizations, fieldsapps: fieldsapps, limitbetaBuildLocalizations: limitbetaBuildLocalizations, limiticons: limiticons, limitindividualTesters: limitindividualTesters) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsappEncryptionDeclarations = options.fieldsappEncryptionDeclarations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appEncryptionDeclarations]"] = fieldsappEncryptionDeclarations + } + if let fieldsbetaAppReviewSubmissions = options.fieldsbetaAppReviewSubmissions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaAppReviewSubmissions]"] = fieldsbetaAppReviewSubmissions + } + if let fieldsbuildBetaDetails = options.fieldsbuildBetaDetails?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[buildBetaDetails]"] = fieldsbuildBetaDetails + } + if let fieldsbuildIcons = options.fieldsbuildIcons?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[buildIcons]"] = fieldsbuildIcons + } + if let fieldsperfPowerMetrics = options.fieldsperfPowerMetrics?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[perfPowerMetrics]"] = fieldsperfPowerMetrics + } + if let fieldspreReleaseVersions = options.fieldspreReleaseVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[preReleaseVersions]"] = fieldspreReleaseVersions + } + if let fieldsappStoreVersions = options.fieldsappStoreVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[appStoreVersions]"] = fieldsappStoreVersions + } + if let fieldsdiagnosticSignatures = options.fieldsdiagnosticSignatures?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[diagnosticSignatures]"] = fieldsdiagnosticSignatures + } + if let fieldsbetaTesters = options.fieldsbetaTesters?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaTesters]"] = fieldsbetaTesters + } + if let fieldsbetaBuildLocalizations = options.fieldsbetaBuildLocalizations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaBuildLocalizations]"] = fieldsbetaBuildLocalizations + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limitbetaBuildLocalizations = options.limitbetaBuildLocalizations { + params["limit[betaBuildLocalizations]"] = limitbetaBuildLocalizations + } + if let limiticons = options.limiticons { + params["limit[icons]"] = limiticons + } + if let limitindividualTesters = options.limitindividualTesters { + params["limit[individualTesters]"] = limitindividualTesters + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildResponse + + /** Single Build */ + case status200(BuildResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BuildResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIconsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIconsGetToManyRelated.swift new file mode 100644 index 000000000..0965ad37b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIconsGetToManyRelated.swift @@ -0,0 +1,162 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsIconsGetToManyRelated { + + public static let service = APIService(id: "builds-icons-get_to_many_related", tag: "Builds", method: "GET", path: "/v1/builds/{id}/icons", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type buildIcons */ + public enum FieldsbuildIcons: String, Codable, Equatable, CaseIterable { + case iconAsset = "iconAsset" + case iconType = "iconType" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type buildIcons */ + public var fieldsbuildIcons: [FieldsbuildIcons]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsbuildIcons: [FieldsbuildIcons]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsbuildIcons = fieldsbuildIcons + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsIconsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbuildIcons: [FieldsbuildIcons]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsbuildIcons: fieldsbuildIcons, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbuildIcons = options.fieldsbuildIcons?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[buildIcons]"] = fieldsbuildIcons + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildIconsResponse + + /** List of related resources */ + case status200(BuildIconsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BuildIconsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildIconsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersCreateToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersCreateToManyRelationship.swift new file mode 100644 index 000000000..6539bbc00 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersCreateToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsIndividualTestersCreateToManyRelationship { + + public static let service = APIService(id: "builds-individualTesters-create_to_many_relationship", tag: "Builds", method: "POST", path: "/v1/builds/{id}/relationships/individualTesters", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BuildIndividualTestersLinkagesRequest + + public init(body: BuildIndividualTestersLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BuildsIndividualTestersCreateToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BuildIndividualTestersLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersDeleteToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersDeleteToManyRelationship.swift new file mode 100644 index 000000000..a6da3bf68 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersDeleteToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsIndividualTestersDeleteToManyRelationship { + + public static let service = APIService(id: "builds-individualTesters-delete_to_many_relationship", tag: "Builds", method: "DELETE", path: "/v1/builds/{id}/relationships/individualTesters", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BuildIndividualTestersLinkagesRequest + + public init(body: BuildIndividualTestersLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BuildsIndividualTestersDeleteToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BuildIndividualTestersLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersGetToManyRelated.swift new file mode 100644 index 000000000..796e71ba1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersGetToManyRelated.swift @@ -0,0 +1,167 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsIndividualTestersGetToManyRelated { + + public static let service = APIService(id: "builds-individualTesters-get_to_many_related", tag: "Builds", method: "GET", path: "/v1/builds/{id}/individualTesters", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type betaTesters */ + public enum FieldsbetaTesters: String, Codable, Equatable, CaseIterable { + case apps = "apps" + case betaGroups = "betaGroups" + case builds = "builds" + case email = "email" + case firstName = "firstName" + case inviteType = "inviteType" + case lastName = "lastName" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type betaTesters */ + public var fieldsbetaTesters: [FieldsbetaTesters]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsbetaTesters: [FieldsbetaTesters]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsbetaTesters = fieldsbetaTesters + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsIndividualTestersGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbetaTesters: [FieldsbetaTesters]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsbetaTesters: fieldsbetaTesters, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbetaTesters = options.fieldsbetaTesters?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[betaTesters]"] = fieldsbetaTesters + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BetaTestersResponse + + /** List of related resources */ + case status200(BetaTestersResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BetaTestersResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BetaTestersResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersGetToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersGetToManyRelationship.swift new file mode 100644 index 000000000..e3d9287dc --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsIndividualTestersGetToManyRelationship.swift @@ -0,0 +1,149 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsIndividualTestersGetToManyRelationship { + + public static let service = APIService(id: "builds-individualTesters-get_to_many_relationship", tag: "Builds", method: "GET", path: "/v1/builds/{id}/relationships/individualTesters", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, limit: Int? = nil) { + self.id = id + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsIndividualTestersGetToManyRelationship.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, limit: Int? = nil) { + let options = Options(id: id, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildIndividualTestersLinkagesResponse + + /** List of related linkages */ + case status200(BuildIndividualTestersLinkagesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BuildIndividualTestersLinkagesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildIndividualTestersLinkagesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsPerfPowerMetricsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsPerfPowerMetricsGetToManyRelated.swift new file mode 100644 index 000000000..e1358d886 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsPerfPowerMetricsGetToManyRelated.swift @@ -0,0 +1,178 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsPerfPowerMetricsGetToManyRelated { + + public static let service = APIService(id: "builds-perfPowerMetrics-get_to_many_related", tag: "Builds", method: "GET", path: "/v1/builds/{id}/perfPowerMetrics", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'metricType' */ + public enum FiltermetricType: String, Codable, Equatable, CaseIterable { + case disk = "DISK" + case hang = "HANG" + case battery = "BATTERY" + case launch = "LAUNCH" + case memory = "MEMORY" + case animation = "ANIMATION" + } + + /** filter by attribute 'platform' */ + public enum Filterplatform: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** filter by attribute 'deviceType' */ + public var filterdeviceType: [String]? + + /** filter by attribute 'metricType' */ + public var filtermetricType: [FiltermetricType]? + + /** filter by attribute 'platform' */ + public var filterplatform: [Filterplatform]? + + public init(id: String, filterdeviceType: [String]? = nil, filtermetricType: [FiltermetricType]? = nil, filterplatform: [Filterplatform]? = nil) { + self.id = id + self.filterdeviceType = filterdeviceType + self.filtermetricType = filtermetricType + self.filterplatform = filterplatform + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsPerfPowerMetricsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, filterdeviceType: [String]? = nil, filtermetricType: [FiltermetricType]? = nil, filterplatform: [Filterplatform]? = nil) { + let options = Options(id: id, filterdeviceType: filterdeviceType, filtermetricType: filtermetricType, filterplatform: filterplatform) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterdeviceType = options.filterdeviceType?.joined(separator: ",") { + params["filter[deviceType]"] = filterdeviceType + } + if let filtermetricType = options.filtermetricType?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[metricType]"] = filtermetricType + } + if let filterplatform = options.filterplatform?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[platform]"] = filterplatform + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = PerfPowerMetricsResponse + + /** List of related resources */ + case status200(PerfPowerMetricsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: PerfPowerMetricsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(PerfPowerMetricsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsPreReleaseVersionGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsPreReleaseVersionGetToOneRelated.swift new file mode 100644 index 000000000..20a58fd22 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsPreReleaseVersionGetToOneRelated.swift @@ -0,0 +1,157 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsPreReleaseVersionGetToOneRelated { + + public static let service = APIService(id: "builds-preReleaseVersion-get_to_one_related", tag: "Builds", method: "GET", path: "/v1/builds/{id}/preReleaseVersion", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type preReleaseVersions */ + public enum FieldspreReleaseVersions: String, Codable, Equatable, CaseIterable { + case app = "app" + case builds = "builds" + case platform = "platform" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type preReleaseVersions */ + public var fieldspreReleaseVersions: [FieldspreReleaseVersions]? + + public init(id: String, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil) { + self.id = id + self.fieldspreReleaseVersions = fieldspreReleaseVersions + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BuildsPreReleaseVersionGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil) { + let options = Options(id: id, fieldspreReleaseVersions: fieldspreReleaseVersions) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldspreReleaseVersions = options.fieldspreReleaseVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[preReleaseVersions]"] = fieldspreReleaseVersions + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = PrereleaseVersionResponse + + /** Related resource */ + case status200(PrereleaseVersionResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: PrereleaseVersionResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(PrereleaseVersionResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsUpdateInstance.swift new file mode 100644 index 000000000..0706f1fac --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Builds { + + public enum BuildsUpdateInstance { + + public static let service = APIService(id: "builds-update_instance", tag: "Builds", method: "PATCH", path: "/v1/builds/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BuildUpdateRequest + + public init(body: BuildUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BuildsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BuildUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildResponse + + /** Single Build */ + case status200(BuildResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BuildResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIdCapabilities/BundleIdCapabilitiesCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIdCapabilities/BundleIdCapabilitiesCreateInstance.swift new file mode 100644 index 000000000..2157886ff --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIdCapabilities/BundleIdCapabilitiesCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BundleIdCapabilities { + + public enum BundleIdCapabilitiesCreateInstance { + + public static let service = APIService(id: "bundleIdCapabilities-create_instance", tag: "BundleIdCapabilities", method: "POST", path: "/v1/bundleIdCapabilities", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: BundleIdCapabilityCreateRequest + + public init(body: BundleIdCapabilityCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: BundleIdCapabilitiesCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BundleIdCapabilityResponse + + /** Single BundleIdCapability */ + case status201(BundleIdCapabilityResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BundleIdCapabilityResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(BundleIdCapabilityResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIdCapabilities/BundleIdCapabilitiesDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIdCapabilities/BundleIdCapabilitiesDeleteInstance.swift new file mode 100644 index 000000000..cab87dc09 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIdCapabilities/BundleIdCapabilitiesDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BundleIdCapabilities { + + public enum BundleIdCapabilitiesDeleteInstance { + + public static let service = APIService(id: "bundleIdCapabilities-delete_instance", tag: "BundleIdCapabilities", method: "DELETE", path: "/v1/bundleIdCapabilities/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BundleIdCapabilitiesDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIdCapabilities/BundleIdCapabilitiesUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIdCapabilities/BundleIdCapabilitiesUpdateInstance.swift new file mode 100644 index 000000000..2c9c7ef96 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIdCapabilities/BundleIdCapabilitiesUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BundleIdCapabilities { + + public enum BundleIdCapabilitiesUpdateInstance { + + public static let service = APIService(id: "bundleIdCapabilities-update_instance", tag: "BundleIdCapabilities", method: "PATCH", path: "/v1/bundleIdCapabilities/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BundleIdCapabilityUpdateRequest + + public init(body: BundleIdCapabilityUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BundleIdCapabilitiesUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BundleIdCapabilityUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BundleIdCapabilityResponse + + /** Single BundleIdCapability */ + case status200(BundleIdCapabilityResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BundleIdCapabilityResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BundleIdCapabilityResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsAppGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsAppGetToOneRelated.swift new file mode 100644 index 000000000..c2e17cfbf --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsAppGetToOneRelated.swift @@ -0,0 +1,176 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BundleIds { + + public enum BundleIdsAppGetToOneRelated { + + public static let service = APIService(id: "bundleIds-app-get_to_one_related", tag: "BundleIds", method: "GET", path: "/v1/bundleIds/{id}/app", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(id: String, fieldsapps: [Fieldsapps]? = nil) { + self.id = id + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BundleIdsAppGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(id: id, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppResponse + + /** Related resource */ + case status200(AppResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsBundleIdCapabilitiesGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsBundleIdCapabilitiesGetToManyRelated.swift new file mode 100644 index 000000000..8975bb32a --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsBundleIdCapabilitiesGetToManyRelated.swift @@ -0,0 +1,163 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BundleIds { + + public enum BundleIdsBundleIdCapabilitiesGetToManyRelated { + + public static let service = APIService(id: "bundleIds-bundleIdCapabilities-get_to_many_related", tag: "BundleIds", method: "GET", path: "/v1/bundleIds/{id}/bundleIdCapabilities", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type bundleIdCapabilities */ + public enum FieldsbundleIdCapabilities: String, Codable, Equatable, CaseIterable { + case bundleId = "bundleId" + case capabilityType = "capabilityType" + case settings = "settings" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type bundleIdCapabilities */ + public var fieldsbundleIdCapabilities: [FieldsbundleIdCapabilities]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsbundleIdCapabilities: [FieldsbundleIdCapabilities]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsbundleIdCapabilities = fieldsbundleIdCapabilities + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BundleIdsBundleIdCapabilitiesGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbundleIdCapabilities: [FieldsbundleIdCapabilities]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsbundleIdCapabilities: fieldsbundleIdCapabilities, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbundleIdCapabilities = options.fieldsbundleIdCapabilities?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[bundleIdCapabilities]"] = fieldsbundleIdCapabilities + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BundleIdCapabilitiesResponse + + /** List of related resources */ + case status200(BundleIdCapabilitiesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BundleIdCapabilitiesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BundleIdCapabilitiesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsCreateInstance.swift new file mode 100644 index 000000000..58c37b871 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BundleIds { + + public enum BundleIdsCreateInstance { + + public static let service = APIService(id: "bundleIds-create_instance", tag: "BundleIds", method: "POST", path: "/v1/bundleIds", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: BundleIdCreateRequest + + public init(body: BundleIdCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: BundleIdsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BundleIdResponse + + /** Single BundleId */ + case status201(BundleIdResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BundleIdResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(BundleIdResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsDeleteInstance.swift new file mode 100644 index 000000000..8c6e361bd --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BundleIds { + + public enum BundleIdsDeleteInstance { + + public static let service = APIService(id: "bundleIds-delete_instance", tag: "BundleIds", method: "DELETE", path: "/v1/bundleIds/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BundleIdsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsGetCollection.swift new file mode 100644 index 000000000..b41ba94a8 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsGetCollection.swift @@ -0,0 +1,311 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BundleIds { + + public enum BundleIdsGetCollection { + + public static let service = APIService(id: "bundleIds-get_collection", tag: "BundleIds", method: "GET", path: "/v1/bundleIds", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'platform' */ + public enum Filterplatform: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + case macOs = "MAC_OS" + } + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public enum Sort: String, Codable, Equatable, CaseIterable { + case id = "id" + case id = "-id" + case identifier = "identifier" + case identifier = "-identifier" + case name = "name" + case name = "-name" + case platform = "platform" + case platform = "-platform" + case seedId = "seedId" + case seedId = "-seedId" + } + + /** the fields to include for returned resources of type bundleIds */ + public enum FieldsbundleIds: String, Codable, Equatable, CaseIterable { + case app = "app" + case bundleIdCapabilities = "bundleIdCapabilities" + case identifier = "identifier" + case name = "name" + case platform = "platform" + case profiles = "profiles" + case seedId = "seedId" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case bundleIdCapabilities = "bundleIdCapabilities" + case profiles = "profiles" + } + + /** the fields to include for returned resources of type bundleIdCapabilities */ + public enum FieldsbundleIdCapabilities: String, Codable, Equatable, CaseIterable { + case bundleId = "bundleId" + case capabilityType = "capabilityType" + case settings = "settings" + } + + /** the fields to include for returned resources of type profiles */ + public enum Fieldsprofiles: String, Codable, Equatable, CaseIterable { + case bundleId = "bundleId" + case certificates = "certificates" + case createdDate = "createdDate" + case devices = "devices" + case expirationDate = "expirationDate" + case name = "name" + case platform = "platform" + case profileContent = "profileContent" + case profileState = "profileState" + case profileType = "profileType" + case uuid = "uuid" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'identifier' */ + public var filteridentifier: [String]? + + /** filter by attribute 'name' */ + public var filtername: [String]? + + /** filter by attribute 'platform' */ + public var filterplatform: [Filterplatform]? + + /** filter by attribute 'seedId' */ + public var filterseedId: [String]? + + /** filter by id(s) */ + public var filterid: [String]? + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public var sort: [Sort]? + + /** the fields to include for returned resources of type bundleIds */ + public var fieldsbundleIds: [FieldsbundleIds]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type bundleIdCapabilities */ + public var fieldsbundleIdCapabilities: [FieldsbundleIdCapabilities]? + + /** the fields to include for returned resources of type profiles */ + public var fieldsprofiles: [Fieldsprofiles]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum number of related bundleIdCapabilities returned (when they are included) */ + public var limitbundleIdCapabilities: Int? + + /** maximum number of related profiles returned (when they are included) */ + public var limitprofiles: Int? + + public init(filteridentifier: [String]? = nil, filtername: [String]? = nil, filterplatform: [Filterplatform]? = nil, filterseedId: [String]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldsbundleIds: [FieldsbundleIds]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbundleIdCapabilities: [FieldsbundleIdCapabilities]? = nil, fieldsprofiles: [Fieldsprofiles]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbundleIdCapabilities: Int? = nil, limitprofiles: Int? = nil) { + self.filteridentifier = filteridentifier + self.filtername = filtername + self.filterplatform = filterplatform + self.filterseedId = filterseedId + self.filterid = filterid + self.sort = sort + self.fieldsbundleIds = fieldsbundleIds + self.limit = limit + self.include = include + self.fieldsbundleIdCapabilities = fieldsbundleIdCapabilities + self.fieldsprofiles = fieldsprofiles + self.fieldsapps = fieldsapps + self.limitbundleIdCapabilities = limitbundleIdCapabilities + self.limitprofiles = limitprofiles + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BundleIdsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filteridentifier: [String]? = nil, filtername: [String]? = nil, filterplatform: [Filterplatform]? = nil, filterseedId: [String]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldsbundleIds: [FieldsbundleIds]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbundleIdCapabilities: [FieldsbundleIdCapabilities]? = nil, fieldsprofiles: [Fieldsprofiles]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbundleIdCapabilities: Int? = nil, limitprofiles: Int? = nil) { + let options = Options(filteridentifier: filteridentifier, filtername: filtername, filterplatform: filterplatform, filterseedId: filterseedId, filterid: filterid, sort: sort, fieldsbundleIds: fieldsbundleIds, limit: limit, include: include, fieldsbundleIdCapabilities: fieldsbundleIdCapabilities, fieldsprofiles: fieldsprofiles, fieldsapps: fieldsapps, limitbundleIdCapabilities: limitbundleIdCapabilities, limitprofiles: limitprofiles) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filteridentifier = options.filteridentifier?.joined(separator: ",") { + params["filter[identifier]"] = filteridentifier + } + if let filtername = options.filtername?.joined(separator: ",") { + params["filter[name]"] = filtername + } + if let filterplatform = options.filterplatform?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[platform]"] = filterplatform + } + if let filterseedId = options.filterseedId?.joined(separator: ",") { + params["filter[seedId]"] = filterseedId + } + if let filterid = options.filterid?.joined(separator: ",") { + params["filter[id]"] = filterid + } + if let sort = options.sort?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["sort"] = sort + } + if let fieldsbundleIds = options.fieldsbundleIds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[bundleIds]"] = fieldsbundleIds + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbundleIdCapabilities = options.fieldsbundleIdCapabilities?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[bundleIdCapabilities]"] = fieldsbundleIdCapabilities + } + if let fieldsprofiles = options.fieldsprofiles?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[profiles]"] = fieldsprofiles + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limitbundleIdCapabilities = options.limitbundleIdCapabilities { + params["limit[bundleIdCapabilities]"] = limitbundleIdCapabilities + } + if let limitprofiles = options.limitprofiles { + params["limit[profiles]"] = limitprofiles + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BundleIdsResponse + + /** List of BundleIds */ + case status200(BundleIdsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: BundleIdsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BundleIdsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsGetInstance.swift new file mode 100644 index 000000000..5665236fc --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsGetInstance.swift @@ -0,0 +1,258 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BundleIds { + + public enum BundleIdsGetInstance { + + public static let service = APIService(id: "bundleIds-get_instance", tag: "BundleIds", method: "GET", path: "/v1/bundleIds/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type bundleIds */ + public enum FieldsbundleIds: String, Codable, Equatable, CaseIterable { + case app = "app" + case bundleIdCapabilities = "bundleIdCapabilities" + case identifier = "identifier" + case name = "name" + case platform = "platform" + case profiles = "profiles" + case seedId = "seedId" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case bundleIdCapabilities = "bundleIdCapabilities" + case profiles = "profiles" + } + + /** the fields to include for returned resources of type bundleIdCapabilities */ + public enum FieldsbundleIdCapabilities: String, Codable, Equatable, CaseIterable { + case bundleId = "bundleId" + case capabilityType = "capabilityType" + case settings = "settings" + } + + /** the fields to include for returned resources of type profiles */ + public enum Fieldsprofiles: String, Codable, Equatable, CaseIterable { + case bundleId = "bundleId" + case certificates = "certificates" + case createdDate = "createdDate" + case devices = "devices" + case expirationDate = "expirationDate" + case name = "name" + case platform = "platform" + case profileContent = "profileContent" + case profileState = "profileState" + case profileType = "profileType" + case uuid = "uuid" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type bundleIds */ + public var fieldsbundleIds: [FieldsbundleIds]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type bundleIdCapabilities */ + public var fieldsbundleIdCapabilities: [FieldsbundleIdCapabilities]? + + /** the fields to include for returned resources of type profiles */ + public var fieldsprofiles: [Fieldsprofiles]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum number of related bundleIdCapabilities returned (when they are included) */ + public var limitbundleIdCapabilities: Int? + + /** maximum number of related profiles returned (when they are included) */ + public var limitprofiles: Int? + + public init(id: String, fieldsbundleIds: [FieldsbundleIds]? = nil, include: [Include]? = nil, fieldsbundleIdCapabilities: [FieldsbundleIdCapabilities]? = nil, fieldsprofiles: [Fieldsprofiles]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbundleIdCapabilities: Int? = nil, limitprofiles: Int? = nil) { + self.id = id + self.fieldsbundleIds = fieldsbundleIds + self.include = include + self.fieldsbundleIdCapabilities = fieldsbundleIdCapabilities + self.fieldsprofiles = fieldsprofiles + self.fieldsapps = fieldsapps + self.limitbundleIdCapabilities = limitbundleIdCapabilities + self.limitprofiles = limitprofiles + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BundleIdsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbundleIds: [FieldsbundleIds]? = nil, include: [Include]? = nil, fieldsbundleIdCapabilities: [FieldsbundleIdCapabilities]? = nil, fieldsprofiles: [Fieldsprofiles]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbundleIdCapabilities: Int? = nil, limitprofiles: Int? = nil) { + let options = Options(id: id, fieldsbundleIds: fieldsbundleIds, include: include, fieldsbundleIdCapabilities: fieldsbundleIdCapabilities, fieldsprofiles: fieldsprofiles, fieldsapps: fieldsapps, limitbundleIdCapabilities: limitbundleIdCapabilities, limitprofiles: limitprofiles) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbundleIds = options.fieldsbundleIds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[bundleIds]"] = fieldsbundleIds + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbundleIdCapabilities = options.fieldsbundleIdCapabilities?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[bundleIdCapabilities]"] = fieldsbundleIdCapabilities + } + if let fieldsprofiles = options.fieldsprofiles?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[profiles]"] = fieldsprofiles + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limitbundleIdCapabilities = options.limitbundleIdCapabilities { + params["limit[bundleIdCapabilities]"] = limitbundleIdCapabilities + } + if let limitprofiles = options.limitprofiles { + params["limit[profiles]"] = limitprofiles + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BundleIdResponse + + /** Single BundleId */ + case status200(BundleIdResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BundleIdResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BundleIdResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsProfilesGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsProfilesGetToManyRelated.swift new file mode 100644 index 000000000..6750070d5 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsProfilesGetToManyRelated.swift @@ -0,0 +1,171 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BundleIds { + + public enum BundleIdsProfilesGetToManyRelated { + + public static let service = APIService(id: "bundleIds-profiles-get_to_many_related", tag: "BundleIds", method: "GET", path: "/v1/bundleIds/{id}/profiles", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type profiles */ + public enum Fieldsprofiles: String, Codable, Equatable, CaseIterable { + case bundleId = "bundleId" + case certificates = "certificates" + case createdDate = "createdDate" + case devices = "devices" + case expirationDate = "expirationDate" + case name = "name" + case platform = "platform" + case profileContent = "profileContent" + case profileState = "profileState" + case profileType = "profileType" + case uuid = "uuid" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type profiles */ + public var fieldsprofiles: [Fieldsprofiles]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsprofiles: [Fieldsprofiles]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsprofiles = fieldsprofiles + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: BundleIdsProfilesGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsprofiles: [Fieldsprofiles]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsprofiles: fieldsprofiles, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsprofiles = options.fieldsprofiles?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[profiles]"] = fieldsprofiles + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = ProfilesResponse + + /** List of related resources */ + case status200(ProfilesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: ProfilesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(ProfilesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsUpdateInstance.swift new file mode 100644 index 000000000..6566e639b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.BundleIds { + + public enum BundleIdsUpdateInstance { + + public static let service = APIService(id: "bundleIds-update_instance", tag: "BundleIds", method: "PATCH", path: "/v1/bundleIds/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: BundleIdUpdateRequest + + public init(body: BundleIdUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: BundleIdsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: BundleIdUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BundleIdResponse + + /** Single BundleId */ + case status200(BundleIdResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: BundleIdResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BundleIdResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesCreateInstance.swift new file mode 100644 index 000000000..6d6e3f19f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Certificates { + + public enum CertificatesCreateInstance { + + public static let service = APIService(id: "certificates-create_instance", tag: "Certificates", method: "POST", path: "/v1/certificates", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: CertificateCreateRequest + + public init(body: CertificateCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: CertificatesCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = CertificateResponse + + /** Single Certificate */ + case status201(CertificateResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: CertificateResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(CertificateResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesDeleteInstance.swift new file mode 100644 index 000000000..d3f70413a --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Certificates { + + public enum CertificatesDeleteInstance { + + public static let service = APIService(id: "certificates-delete_instance", tag: "Certificates", method: "DELETE", path: "/v1/certificates/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: CertificatesDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesGetCollection.swift new file mode 100644 index 000000000..9f44b7a28 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesGetCollection.swift @@ -0,0 +1,212 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Certificates { + + public enum CertificatesGetCollection { + + public static let service = APIService(id: "certificates-get_collection", tag: "Certificates", method: "GET", path: "/v1/certificates", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'certificateType' */ + public enum FiltercertificateType: String, Codable, Equatable, CaseIterable { + case iosDevelopment = "IOS_DEVELOPMENT" + case iosDistribution = "IOS_DISTRIBUTION" + case macAppDistribution = "MAC_APP_DISTRIBUTION" + case macInstallerDistribution = "MAC_INSTALLER_DISTRIBUTION" + case macAppDevelopment = "MAC_APP_DEVELOPMENT" + case developerIdKext = "DEVELOPER_ID_KEXT" + case developerIdApplication = "DEVELOPER_ID_APPLICATION" + case development = "DEVELOPMENT" + case distribution = "DISTRIBUTION" + } + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public enum Sort: String, Codable, Equatable, CaseIterable { + case certificateType = "certificateType" + case certificateType = "-certificateType" + case displayName = "displayName" + case displayName = "-displayName" + case id = "id" + case id = "-id" + case serialNumber = "serialNumber" + case serialNumber = "-serialNumber" + } + + /** the fields to include for returned resources of type certificates */ + public enum Fieldscertificates: String, Codable, Equatable, CaseIterable { + case certificateContent = "certificateContent" + case certificateType = "certificateType" + case csrContent = "csrContent" + case displayName = "displayName" + case expirationDate = "expirationDate" + case name = "name" + case platform = "platform" + case serialNumber = "serialNumber" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'certificateType' */ + public var filtercertificateType: [FiltercertificateType]? + + /** filter by attribute 'displayName' */ + public var filterdisplayName: [String]? + + /** filter by attribute 'serialNumber' */ + public var filterserialNumber: [String]? + + /** filter by id(s) */ + public var filterid: [String]? + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public var sort: [Sort]? + + /** the fields to include for returned resources of type certificates */ + public var fieldscertificates: [Fieldscertificates]? + + /** maximum resources per page */ + public var limit: Int? + + public init(filtercertificateType: [FiltercertificateType]? = nil, filterdisplayName: [String]? = nil, filterserialNumber: [String]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldscertificates: [Fieldscertificates]? = nil, limit: Int? = nil) { + self.filtercertificateType = filtercertificateType + self.filterdisplayName = filterdisplayName + self.filterserialNumber = filterserialNumber + self.filterid = filterid + self.sort = sort + self.fieldscertificates = fieldscertificates + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: CertificatesGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filtercertificateType: [FiltercertificateType]? = nil, filterdisplayName: [String]? = nil, filterserialNumber: [String]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldscertificates: [Fieldscertificates]? = nil, limit: Int? = nil) { + let options = Options(filtercertificateType: filtercertificateType, filterdisplayName: filterdisplayName, filterserialNumber: filterserialNumber, filterid: filterid, sort: sort, fieldscertificates: fieldscertificates, limit: limit) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filtercertificateType = options.filtercertificateType?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[certificateType]"] = filtercertificateType + } + if let filterdisplayName = options.filterdisplayName?.joined(separator: ",") { + params["filter[displayName]"] = filterdisplayName + } + if let filterserialNumber = options.filterserialNumber?.joined(separator: ",") { + params["filter[serialNumber]"] = filterserialNumber + } + if let filterid = options.filterid?.joined(separator: ",") { + params["filter[id]"] = filterid + } + if let sort = options.sort?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["sort"] = sort + } + if let fieldscertificates = options.fieldscertificates?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[certificates]"] = fieldscertificates + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = CertificatesResponse + + /** List of Certificates */ + case status200(CertificatesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: CertificatesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(CertificatesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesGetInstance.swift new file mode 100644 index 000000000..adbc68044 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesGetInstance.swift @@ -0,0 +1,161 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Certificates { + + public enum CertificatesGetInstance { + + public static let service = APIService(id: "certificates-get_instance", tag: "Certificates", method: "GET", path: "/v1/certificates/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type certificates */ + public enum Fieldscertificates: String, Codable, Equatable, CaseIterable { + case certificateContent = "certificateContent" + case certificateType = "certificateType" + case csrContent = "csrContent" + case displayName = "displayName" + case expirationDate = "expirationDate" + case name = "name" + case platform = "platform" + case serialNumber = "serialNumber" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type certificates */ + public var fieldscertificates: [Fieldscertificates]? + + public init(id: String, fieldscertificates: [Fieldscertificates]? = nil) { + self.id = id + self.fieldscertificates = fieldscertificates + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: CertificatesGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldscertificates: [Fieldscertificates]? = nil) { + let options = Options(id: id, fieldscertificates: fieldscertificates) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldscertificates = options.fieldscertificates?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[certificates]"] = fieldscertificates + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = CertificateResponse + + /** Single Certificate */ + case status200(CertificateResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: CertificateResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(CertificateResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesCreateInstance.swift new file mode 100644 index 000000000..5a4c100e7 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Devices { + + public enum DevicesCreateInstance { + + public static let service = APIService(id: "devices-create_instance", tag: "Devices", method: "POST", path: "/v1/devices", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: DeviceCreateRequest + + public init(body: DeviceCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: DevicesCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = DeviceResponse + + /** Single Device */ + case status201(DeviceResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: DeviceResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(DeviceResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesGetCollection.swift new file mode 100644 index 000000000..93d1a0537 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesGetCollection.swift @@ -0,0 +1,219 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Devices { + + public enum DevicesGetCollection { + + public static let service = APIService(id: "devices-get_collection", tag: "Devices", method: "GET", path: "/v1/devices", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'platform' */ + public enum Filterplatform: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + case macOs = "MAC_OS" + } + + /** filter by attribute 'status' */ + public enum Filterstatus: String, Codable, Equatable, CaseIterable { + case enabled = "ENABLED" + case disabled = "DISABLED" + } + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public enum Sort: String, Codable, Equatable, CaseIterable { + case id = "id" + case id = "-id" + case name = "name" + case name = "-name" + case platform = "platform" + case platform = "-platform" + case status = "status" + case status = "-status" + case udid = "udid" + case udid = "-udid" + } + + /** the fields to include for returned resources of type devices */ + public enum Fieldsdevices: String, Codable, Equatable, CaseIterable { + case addedDate = "addedDate" + case deviceClass = "deviceClass" + case model = "model" + case name = "name" + case platform = "platform" + case status = "status" + case udid = "udid" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'name' */ + public var filtername: [String]? + + /** filter by attribute 'platform' */ + public var filterplatform: [Filterplatform]? + + /** filter by attribute 'status' */ + public var filterstatus: [Filterstatus]? + + /** filter by attribute 'udid' */ + public var filterudid: [String]? + + /** filter by id(s) */ + public var filterid: [String]? + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public var sort: [Sort]? + + /** the fields to include for returned resources of type devices */ + public var fieldsdevices: [Fieldsdevices]? + + /** maximum resources per page */ + public var limit: Int? + + public init(filtername: [String]? = nil, filterplatform: [Filterplatform]? = nil, filterstatus: [Filterstatus]? = nil, filterudid: [String]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldsdevices: [Fieldsdevices]? = nil, limit: Int? = nil) { + self.filtername = filtername + self.filterplatform = filterplatform + self.filterstatus = filterstatus + self.filterudid = filterudid + self.filterid = filterid + self.sort = sort + self.fieldsdevices = fieldsdevices + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: DevicesGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filtername: [String]? = nil, filterplatform: [Filterplatform]? = nil, filterstatus: [Filterstatus]? = nil, filterudid: [String]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldsdevices: [Fieldsdevices]? = nil, limit: Int? = nil) { + let options = Options(filtername: filtername, filterplatform: filterplatform, filterstatus: filterstatus, filterudid: filterudid, filterid: filterid, sort: sort, fieldsdevices: fieldsdevices, limit: limit) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filtername = options.filtername?.joined(separator: ",") { + params["filter[name]"] = filtername + } + if let filterplatform = options.filterplatform?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[platform]"] = filterplatform + } + if let filterstatus = options.filterstatus?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[status]"] = filterstatus + } + if let filterudid = options.filterudid?.joined(separator: ",") { + params["filter[udid]"] = filterudid + } + if let filterid = options.filterid?.joined(separator: ",") { + params["filter[id]"] = filterid + } + if let sort = options.sort?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["sort"] = sort + } + if let fieldsdevices = options.fieldsdevices?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[devices]"] = fieldsdevices + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = DevicesResponse + + /** List of Devices */ + case status200(DevicesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: DevicesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(DevicesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesGetInstance.swift new file mode 100644 index 000000000..cd87439d1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesGetInstance.swift @@ -0,0 +1,160 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Devices { + + public enum DevicesGetInstance { + + public static let service = APIService(id: "devices-get_instance", tag: "Devices", method: "GET", path: "/v1/devices/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type devices */ + public enum Fieldsdevices: String, Codable, Equatable, CaseIterable { + case addedDate = "addedDate" + case deviceClass = "deviceClass" + case model = "model" + case name = "name" + case platform = "platform" + case status = "status" + case udid = "udid" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type devices */ + public var fieldsdevices: [Fieldsdevices]? + + public init(id: String, fieldsdevices: [Fieldsdevices]? = nil) { + self.id = id + self.fieldsdevices = fieldsdevices + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: DevicesGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsdevices: [Fieldsdevices]? = nil) { + let options = Options(id: id, fieldsdevices: fieldsdevices) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsdevices = options.fieldsdevices?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[devices]"] = fieldsdevices + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = DeviceResponse + + /** Single Device */ + case status200(DeviceResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: DeviceResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(DeviceResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesUpdateInstance.swift new file mode 100644 index 000000000..26a1a435e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Devices { + + public enum DevicesUpdateInstance { + + public static let service = APIService(id: "devices-update_instance", tag: "Devices", method: "PATCH", path: "/v1/devices/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: DeviceUpdateRequest + + public init(body: DeviceUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: DevicesUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: DeviceUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = DeviceResponse + + /** Single Device */ + case status200(DeviceResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: DeviceResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(DeviceResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/DiagnosticSignatures/DiagnosticSignaturesLogsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/DiagnosticSignatures/DiagnosticSignaturesLogsGetToManyRelated.swift new file mode 100644 index 000000000..ba4560022 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/DiagnosticSignatures/DiagnosticSignaturesLogsGetToManyRelated.swift @@ -0,0 +1,149 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.DiagnosticSignatures { + + public enum DiagnosticSignaturesLogsGetToManyRelated { + + public static let service = APIService(id: "diagnosticSignatures-logs-get_to_many_related", tag: "DiagnosticSignatures", method: "GET", path: "/v1/diagnosticSignatures/{id}/logs", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, limit: Int? = nil) { + self.id = id + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: DiagnosticSignaturesLogsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, limit: Int? = nil) { + let options = Options(id: id, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = DiagnosticLogsResponse + + /** List of related resources */ + case status200(DiagnosticLogsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: DiagnosticLogsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(DiagnosticLogsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsCreateInstance.swift new file mode 100644 index 000000000..af4a2ed47 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.EndUserLicenseAgreements { + + public enum EndUserLicenseAgreementsCreateInstance { + + public static let service = APIService(id: "endUserLicenseAgreements-create_instance", tag: "EndUserLicenseAgreements", method: "POST", path: "/v1/endUserLicenseAgreements", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: EndUserLicenseAgreementCreateRequest + + public init(body: EndUserLicenseAgreementCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: EndUserLicenseAgreementsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = EndUserLicenseAgreementResponse + + /** Single EndUserLicenseAgreement */ + case status201(EndUserLicenseAgreementResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: EndUserLicenseAgreementResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(EndUserLicenseAgreementResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsDeleteInstance.swift new file mode 100644 index 000000000..330e38660 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.EndUserLicenseAgreements { + + public enum EndUserLicenseAgreementsDeleteInstance { + + public static let service = APIService(id: "endUserLicenseAgreements-delete_instance", tag: "EndUserLicenseAgreements", method: "DELETE", path: "/v1/endUserLicenseAgreements/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: EndUserLicenseAgreementsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsGetInstance.swift new file mode 100644 index 000000000..b14e11d0b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsGetInstance.swift @@ -0,0 +1,188 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.EndUserLicenseAgreements { + + public enum EndUserLicenseAgreementsGetInstance { + + public static let service = APIService(id: "endUserLicenseAgreements-get_instance", tag: "EndUserLicenseAgreements", method: "GET", path: "/v1/endUserLicenseAgreements/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type endUserLicenseAgreements */ + public enum FieldsendUserLicenseAgreements: String, Codable, Equatable, CaseIterable { + case agreementText = "agreementText" + case app = "app" + case territories = "territories" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case territories = "territories" + } + + /** the fields to include for returned resources of type territories */ + public enum Fieldsterritories: String, Codable, Equatable, CaseIterable { + case currency = "currency" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type endUserLicenseAgreements */ + public var fieldsendUserLicenseAgreements: [FieldsendUserLicenseAgreements]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type territories */ + public var fieldsterritories: [Fieldsterritories]? + + /** maximum number of related territories returned (when they are included) */ + public var limitterritories: Int? + + public init(id: String, fieldsendUserLicenseAgreements: [FieldsendUserLicenseAgreements]? = nil, include: [Include]? = nil, fieldsterritories: [Fieldsterritories]? = nil, limitterritories: Int? = nil) { + self.id = id + self.fieldsendUserLicenseAgreements = fieldsendUserLicenseAgreements + self.include = include + self.fieldsterritories = fieldsterritories + self.limitterritories = limitterritories + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: EndUserLicenseAgreementsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsendUserLicenseAgreements: [FieldsendUserLicenseAgreements]? = nil, include: [Include]? = nil, fieldsterritories: [Fieldsterritories]? = nil, limitterritories: Int? = nil) { + let options = Options(id: id, fieldsendUserLicenseAgreements: fieldsendUserLicenseAgreements, include: include, fieldsterritories: fieldsterritories, limitterritories: limitterritories) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsendUserLicenseAgreements = options.fieldsendUserLicenseAgreements?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[endUserLicenseAgreements]"] = fieldsendUserLicenseAgreements + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsterritories = options.fieldsterritories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[territories]"] = fieldsterritories + } + if let limitterritories = options.limitterritories { + params["limit[territories]"] = limitterritories + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = EndUserLicenseAgreementResponse + + /** Single EndUserLicenseAgreement */ + case status200(EndUserLicenseAgreementResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: EndUserLicenseAgreementResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(EndUserLicenseAgreementResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsTerritoriesGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsTerritoriesGetToManyRelated.swift new file mode 100644 index 000000000..9f6402c90 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsTerritoriesGetToManyRelated.swift @@ -0,0 +1,161 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.EndUserLicenseAgreements { + + public enum EndUserLicenseAgreementsTerritoriesGetToManyRelated { + + public static let service = APIService(id: "endUserLicenseAgreements-territories-get_to_many_related", tag: "EndUserLicenseAgreements", method: "GET", path: "/v1/endUserLicenseAgreements/{id}/territories", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type territories */ + public enum Fieldsterritories: String, Codable, Equatable, CaseIterable { + case currency = "currency" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type territories */ + public var fieldsterritories: [Fieldsterritories]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsterritories: [Fieldsterritories]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsterritories = fieldsterritories + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: EndUserLicenseAgreementsTerritoriesGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsterritories: [Fieldsterritories]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsterritories: fieldsterritories, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsterritories = options.fieldsterritories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[territories]"] = fieldsterritories + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = TerritoriesResponse + + /** List of related resources */ + case status200(TerritoriesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: TerritoriesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(TerritoriesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsUpdateInstance.swift new file mode 100644 index 000000000..939273168 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/EndUserLicenseAgreements/EndUserLicenseAgreementsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.EndUserLicenseAgreements { + + public enum EndUserLicenseAgreementsUpdateInstance { + + public static let service = APIService(id: "endUserLicenseAgreements-update_instance", tag: "EndUserLicenseAgreements", method: "PATCH", path: "/v1/endUserLicenseAgreements/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: EndUserLicenseAgreementUpdateRequest + + public init(body: EndUserLicenseAgreementUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: EndUserLicenseAgreementsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: EndUserLicenseAgreementUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = EndUserLicenseAgreementResponse + + /** Single EndUserLicenseAgreement */ + case status200(EndUserLicenseAgreementResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: EndUserLicenseAgreementResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(EndUserLicenseAgreementResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/FinanceReports/FinanceReportsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/FinanceReports/FinanceReportsGetCollection.swift new file mode 100644 index 000000000..a5f31b170 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/FinanceReports/FinanceReportsGetCollection.swift @@ -0,0 +1,152 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.FinanceReports { + + public enum FinanceReportsGetCollection { + + public static let service = APIService(id: "financeReports-get_collection", tag: "FinanceReports", method: "GET", path: "/v1/financeReports", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'reportType' */ + public enum FilterreportType: String, Codable, Equatable, CaseIterable { + case financial = "FINANCIAL" + case financeDetail = "FINANCE_DETAIL" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'regionCode' */ + public var filterregionCode: [String] + + /** filter by attribute 'reportDate' */ + public var filterreportDate: [String] + + /** filter by attribute 'reportType' */ + public var filterreportType: [FilterreportType] + + /** filter by attribute 'vendorNumber' */ + public var filtervendorNumber: [String] + + public init(filterregionCode: [String], filterreportDate: [String], filterreportType: [FilterreportType], filtervendorNumber: [String]) { + self.filterregionCode = filterregionCode + self.filterreportDate = filterreportDate + self.filterreportType = filterreportType + self.filtervendorNumber = filtervendorNumber + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: FinanceReportsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterregionCode: [String], filterreportDate: [String], filterreportType: [FilterreportType], filtervendorNumber: [String]) { + let options = Options(filterregionCode: filterregionCode, filterreportDate: filterreportDate, filterreportType: filterreportType, filtervendorNumber: filtervendorNumber) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + params["filter[regionCode]"] = options.filterregionCode.joined(separator: ",") + params["filter[reportDate]"] = options.filterreportDate.joined(separator: ",") + params["filter[reportType]"] = options.filterreportType.encode().map({ String(describing: $0) }).joined(separator: ",") + params["filter[vendorNumber]"] = options.filtervendorNumber.joined(separator: ",") + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = File + + /** List of FinanceReports */ + case status200(File) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: File? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(File.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsCreateToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsCreateToManyRelationship.swift new file mode 100644 index 000000000..d9e0f5cdc --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsCreateToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.GameCenterEnabledVersions { + + public enum GameCenterEnabledVersionsCompatibleVersionsCreateToManyRelationship { + + public static let service = APIService(id: "gameCenterEnabledVersions-compatibleVersions-create_to_many_relationship", tag: "GameCenterEnabledVersions", method: "POST", path: "/v1/gameCenterEnabledVersions/{id}/relationships/compatibleVersions", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: GameCenterEnabledVersionCompatibleVersionsLinkagesRequest + + public init(body: GameCenterEnabledVersionCompatibleVersionsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: GameCenterEnabledVersionsCompatibleVersionsCreateToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: GameCenterEnabledVersionCompatibleVersionsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsDeleteToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsDeleteToManyRelationship.swift new file mode 100644 index 000000000..e0d79bbd4 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsDeleteToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.GameCenterEnabledVersions { + + public enum GameCenterEnabledVersionsCompatibleVersionsDeleteToManyRelationship { + + public static let service = APIService(id: "gameCenterEnabledVersions-compatibleVersions-delete_to_many_relationship", tag: "GameCenterEnabledVersions", method: "DELETE", path: "/v1/gameCenterEnabledVersions/{id}/relationships/compatibleVersions", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: GameCenterEnabledVersionCompatibleVersionsLinkagesRequest + + public init(body: GameCenterEnabledVersionCompatibleVersionsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: GameCenterEnabledVersionsCompatibleVersionsDeleteToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: GameCenterEnabledVersionCompatibleVersionsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsGetToManyRelated.swift new file mode 100644 index 000000000..bebfdcd14 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsGetToManyRelated.swift @@ -0,0 +1,260 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.GameCenterEnabledVersions { + + public enum GameCenterEnabledVersionsCompatibleVersionsGetToManyRelated { + + public static let service = APIService(id: "gameCenterEnabledVersions-compatibleVersions-get_to_many_related", tag: "GameCenterEnabledVersions", method: "GET", path: "/v1/gameCenterEnabledVersions/{id}/compatibleVersions", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'platform' */ + public enum Filterplatform: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + case macOs = "MAC_OS" + case tvOs = "TV_OS" + } + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public enum Sort: String, Codable, Equatable, CaseIterable { + case versionString = "versionString" + case versionString = "-versionString" + } + + /** the fields to include for returned resources of type gameCenterEnabledVersions */ + public enum FieldsgameCenterEnabledVersions: String, Codable, Equatable, CaseIterable { + case app = "app" + case compatibleVersions = "compatibleVersions" + case iconAsset = "iconAsset" + case platform = "platform" + case versionString = "versionString" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case compatibleVersions = "compatibleVersions" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** filter by attribute 'platform' */ + public var filterplatform: [Filterplatform]? + + /** filter by attribute 'versionString' */ + public var filterversionString: [String]? + + /** filter by id(s) of related 'app' */ + public var filterapp: [String]? + + /** filter by id(s) */ + public var filterid: [String]? + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public var sort: [Sort]? + + /** the fields to include for returned resources of type gameCenterEnabledVersions */ + public var fieldsgameCenterEnabledVersions: [FieldsgameCenterEnabledVersions]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, filterplatform: [Filterplatform]? = nil, filterversionString: [String]? = nil, filterapp: [String]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldsgameCenterEnabledVersions: [FieldsgameCenterEnabledVersions]? = nil, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil, include: [Include]? = nil) { + self.id = id + self.filterplatform = filterplatform + self.filterversionString = filterversionString + self.filterapp = filterapp + self.filterid = filterid + self.sort = sort + self.fieldsgameCenterEnabledVersions = fieldsgameCenterEnabledVersions + self.fieldsapps = fieldsapps + self.limit = limit + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: GameCenterEnabledVersionsCompatibleVersionsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, filterplatform: [Filterplatform]? = nil, filterversionString: [String]? = nil, filterapp: [String]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldsgameCenterEnabledVersions: [FieldsgameCenterEnabledVersions]? = nil, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil, include: [Include]? = nil) { + let options = Options(id: id, filterplatform: filterplatform, filterversionString: filterversionString, filterapp: filterapp, filterid: filterid, sort: sort, fieldsgameCenterEnabledVersions: fieldsgameCenterEnabledVersions, fieldsapps: fieldsapps, limit: limit, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterplatform = options.filterplatform?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[platform]"] = filterplatform + } + if let filterversionString = options.filterversionString?.joined(separator: ",") { + params["filter[versionString]"] = filterversionString + } + if let filterapp = options.filterapp?.joined(separator: ",") { + params["filter[app]"] = filterapp + } + if let filterid = options.filterid?.joined(separator: ",") { + params["filter[id]"] = filterid + } + if let sort = options.sort?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["sort"] = sort + } + if let fieldsgameCenterEnabledVersions = options.fieldsgameCenterEnabledVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[gameCenterEnabledVersions]"] = fieldsgameCenterEnabledVersions + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = GameCenterEnabledVersionsResponse + + /** List of related resources */ + case status200(GameCenterEnabledVersionsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: GameCenterEnabledVersionsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(GameCenterEnabledVersionsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsGetToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsGetToManyRelationship.swift new file mode 100644 index 000000000..834b8403e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsGetToManyRelationship.swift @@ -0,0 +1,149 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.GameCenterEnabledVersions { + + public enum GameCenterEnabledVersionsCompatibleVersionsGetToManyRelationship { + + public static let service = APIService(id: "gameCenterEnabledVersions-compatibleVersions-get_to_many_relationship", tag: "GameCenterEnabledVersions", method: "GET", path: "/v1/gameCenterEnabledVersions/{id}/relationships/compatibleVersions", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, limit: Int? = nil) { + self.id = id + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: GameCenterEnabledVersionsCompatibleVersionsGetToManyRelationship.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, limit: Int? = nil) { + let options = Options(id: id, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = GameCenterEnabledVersionCompatibleVersionsLinkagesResponse + + /** List of related linkages */ + case status200(GameCenterEnabledVersionCompatibleVersionsLinkagesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: GameCenterEnabledVersionCompatibleVersionsLinkagesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(GameCenterEnabledVersionCompatibleVersionsLinkagesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsReplaceToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsReplaceToManyRelationship.swift new file mode 100644 index 000000000..a035b9da1 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsReplaceToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.GameCenterEnabledVersions { + + public enum GameCenterEnabledVersionsCompatibleVersionsReplaceToManyRelationship { + + public static let service = APIService(id: "gameCenterEnabledVersions-compatibleVersions-replace_to_many_relationship", tag: "GameCenterEnabledVersions", method: "PATCH", path: "/v1/gameCenterEnabledVersions/{id}/relationships/compatibleVersions", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: GameCenterEnabledVersionCompatibleVersionsLinkagesRequest + + public init(body: GameCenterEnabledVersionCompatibleVersionsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: GameCenterEnabledVersionsCompatibleVersionsReplaceToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: GameCenterEnabledVersionCompatibleVersionsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/IdfaDeclarations/IdfaDeclarationsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/IdfaDeclarations/IdfaDeclarationsCreateInstance.swift new file mode 100644 index 000000000..eac990e8f --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/IdfaDeclarations/IdfaDeclarationsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.IdfaDeclarations { + + public enum IdfaDeclarationsCreateInstance { + + public static let service = APIService(id: "idfaDeclarations-create_instance", tag: "IdfaDeclarations", method: "POST", path: "/v1/idfaDeclarations", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: IdfaDeclarationCreateRequest + + public init(body: IdfaDeclarationCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: IdfaDeclarationsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = IdfaDeclarationResponse + + /** Single IdfaDeclaration */ + case status201(IdfaDeclarationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: IdfaDeclarationResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(IdfaDeclarationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/IdfaDeclarations/IdfaDeclarationsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/IdfaDeclarations/IdfaDeclarationsDeleteInstance.swift new file mode 100644 index 000000000..0795bc357 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/IdfaDeclarations/IdfaDeclarationsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.IdfaDeclarations { + + public enum IdfaDeclarationsDeleteInstance { + + public static let service = APIService(id: "idfaDeclarations-delete_instance", tag: "IdfaDeclarations", method: "DELETE", path: "/v1/idfaDeclarations/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: IdfaDeclarationsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/IdfaDeclarations/IdfaDeclarationsUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/IdfaDeclarations/IdfaDeclarationsUpdateInstance.swift new file mode 100644 index 000000000..3d2da20a2 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/IdfaDeclarations/IdfaDeclarationsUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.IdfaDeclarations { + + public enum IdfaDeclarationsUpdateInstance { + + public static let service = APIService(id: "idfaDeclarations-update_instance", tag: "IdfaDeclarations", method: "PATCH", path: "/v1/idfaDeclarations/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: IdfaDeclarationUpdateRequest + + public init(body: IdfaDeclarationUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: IdfaDeclarationsUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: IdfaDeclarationUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = IdfaDeclarationResponse + + /** Single IdfaDeclaration */ + case status200(IdfaDeclarationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: IdfaDeclarationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(IdfaDeclarationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/InAppPurchases/InAppPurchasesGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/InAppPurchases/InAppPurchasesGetInstance.swift new file mode 100644 index 000000000..74cdabdef --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/InAppPurchases/InAppPurchasesGetInstance.swift @@ -0,0 +1,177 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.InAppPurchases { + + public enum InAppPurchasesGetInstance { + + public static let service = APIService(id: "inAppPurchases-get_instance", tag: "InAppPurchases", method: "GET", path: "/v1/inAppPurchases/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type inAppPurchases */ + public enum FieldsinAppPurchases: String, Codable, Equatable, CaseIterable { + case apps = "apps" + case inAppPurchaseType = "inAppPurchaseType" + case productId = "productId" + case referenceName = "referenceName" + case state = "state" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case apps = "apps" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type inAppPurchases */ + public var fieldsinAppPurchases: [FieldsinAppPurchases]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** maximum number of related apps returned (when they are included) */ + public var limitapps: Int? + + public init(id: String, fieldsinAppPurchases: [FieldsinAppPurchases]? = nil, include: [Include]? = nil, limitapps: Int? = nil) { + self.id = id + self.fieldsinAppPurchases = fieldsinAppPurchases + self.include = include + self.limitapps = limitapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: InAppPurchasesGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsinAppPurchases: [FieldsinAppPurchases]? = nil, include: [Include]? = nil, limitapps: Int? = nil) { + let options = Options(id: id, fieldsinAppPurchases: fieldsinAppPurchases, include: include, limitapps: limitapps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsinAppPurchases = options.fieldsinAppPurchases?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[inAppPurchases]"] = fieldsinAppPurchases + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let limitapps = options.limitapps { + params["limit[apps]"] = limitapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = InAppPurchaseResponse + + /** Single InAppPurchase */ + case status200(InAppPurchaseResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: InAppPurchaseResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(InAppPurchaseResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsAppGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsAppGetToOneRelated.swift new file mode 100644 index 000000000..a4ce8254c --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsAppGetToOneRelated.swift @@ -0,0 +1,176 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.PreReleaseVersions { + + public enum PreReleaseVersionsAppGetToOneRelated { + + public static let service = APIService(id: "preReleaseVersions-app-get_to_one_related", tag: "PreReleaseVersions", method: "GET", path: "/v1/preReleaseVersions/{id}/app", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + public init(id: String, fieldsapps: [Fieldsapps]? = nil) { + self.id = id + self.fieldsapps = fieldsapps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: PreReleaseVersionsAppGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsapps: [Fieldsapps]? = nil) { + let options = Options(id: id, fieldsapps: fieldsapps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppResponse + + /** Related resource */ + case status200(AppResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsBuildsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsBuildsGetToManyRelated.swift new file mode 100644 index 000000000..58c8f74b0 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsBuildsGetToManyRelated.swift @@ -0,0 +1,180 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.PreReleaseVersions { + + public enum PreReleaseVersionsBuildsGetToManyRelated { + + public static let service = APIService(id: "preReleaseVersions-builds-get_to_many_related", tag: "PreReleaseVersions", method: "GET", path: "/v1/preReleaseVersions/{id}/builds", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsbuilds = fieldsbuilds + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: PreReleaseVersionsBuildsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbuilds: [Fieldsbuilds]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsbuilds: fieldsbuilds, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BuildsResponse + + /** List of related resources */ + case status200(BuildsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BuildsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BuildsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsGetCollection.swift new file mode 100644 index 000000000..6cca16618 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsGetCollection.swift @@ -0,0 +1,303 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.PreReleaseVersions { + + public enum PreReleaseVersionsGetCollection { + + public static let service = APIService(id: "preReleaseVersions-get_collection", tag: "PreReleaseVersions", method: "GET", path: "/v1/preReleaseVersions", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'builds.processingState' */ + public enum FilterbuildsProcessingState: String, Codable, Equatable, CaseIterable { + case processing = "PROCESSING" + case failed = "FAILED" + case invalid = "INVALID" + case valid = "VALID" + } + + /** filter by attribute 'platform' */ + public enum Filterplatform: String, Codable, Equatable, CaseIterable { + case ios = "IOS" + case macOs = "MAC_OS" + case tvOs = "TV_OS" + } + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public enum Sort: String, Codable, Equatable, CaseIterable { + case version = "version" + case version = "-version" + } + + /** the fields to include for returned resources of type preReleaseVersions */ + public enum FieldspreReleaseVersions: String, Codable, Equatable, CaseIterable { + case app = "app" + case builds = "builds" + case platform = "platform" + case version = "version" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case builds = "builds" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'builds.expired' */ + public var filterbuildsExpired: [String]? + + /** filter by attribute 'builds.processingState' */ + public var filterbuildsProcessingState: [FilterbuildsProcessingState]? + + /** filter by attribute 'platform' */ + public var filterplatform: [Filterplatform]? + + /** filter by attribute 'version' */ + public var filterversion: [String]? + + /** filter by id(s) of related 'app' */ + public var filterapp: [String]? + + /** filter by id(s) of related 'builds' */ + public var filterbuilds: [String]? + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public var sort: [Sort]? + + /** the fields to include for returned resources of type preReleaseVersions */ + public var fieldspreReleaseVersions: [FieldspreReleaseVersions]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum number of related builds returned (when they are included) */ + public var limitbuilds: Int? + + public init(filterbuildsExpired: [String]? = nil, filterbuildsProcessingState: [FilterbuildsProcessingState]? = nil, filterplatform: [Filterplatform]? = nil, filterversion: [String]? = nil, filterapp: [String]? = nil, filterbuilds: [String]? = nil, sort: [Sort]? = nil, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbuilds: Int? = nil) { + self.filterbuildsExpired = filterbuildsExpired + self.filterbuildsProcessingState = filterbuildsProcessingState + self.filterplatform = filterplatform + self.filterversion = filterversion + self.filterapp = filterapp + self.filterbuilds = filterbuilds + self.sort = sort + self.fieldspreReleaseVersions = fieldspreReleaseVersions + self.limit = limit + self.include = include + self.fieldsbuilds = fieldsbuilds + self.fieldsapps = fieldsapps + self.limitbuilds = limitbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: PreReleaseVersionsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterbuildsExpired: [String]? = nil, filterbuildsProcessingState: [FilterbuildsProcessingState]? = nil, filterplatform: [Filterplatform]? = nil, filterversion: [String]? = nil, filterapp: [String]? = nil, filterbuilds: [String]? = nil, sort: [Sort]? = nil, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbuilds: Int? = nil) { + let options = Options(filterbuildsExpired: filterbuildsExpired, filterbuildsProcessingState: filterbuildsProcessingState, filterplatform: filterplatform, filterversion: filterversion, filterapp: filterapp, filterbuilds: filterbuilds, sort: sort, fieldspreReleaseVersions: fieldspreReleaseVersions, limit: limit, include: include, fieldsbuilds: fieldsbuilds, fieldsapps: fieldsapps, limitbuilds: limitbuilds) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterbuildsExpired = options.filterbuildsExpired?.joined(separator: ",") { + params["filter[builds.expired]"] = filterbuildsExpired + } + if let filterbuildsProcessingState = options.filterbuildsProcessingState?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[builds.processingState]"] = filterbuildsProcessingState + } + if let filterplatform = options.filterplatform?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[platform]"] = filterplatform + } + if let filterversion = options.filterversion?.joined(separator: ",") { + params["filter[version]"] = filterversion + } + if let filterapp = options.filterapp?.joined(separator: ",") { + params["filter[app]"] = filterapp + } + if let filterbuilds = options.filterbuilds?.joined(separator: ",") { + params["filter[builds]"] = filterbuilds + } + if let sort = options.sort?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["sort"] = sort + } + if let fieldspreReleaseVersions = options.fieldspreReleaseVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[preReleaseVersions]"] = fieldspreReleaseVersions + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limitbuilds = options.limitbuilds { + params["limit[builds]"] = limitbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = PreReleaseVersionsResponse + + /** List of PreReleaseVersions */ + case status200(PreReleaseVersionsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: PreReleaseVersionsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(PreReleaseVersionsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsGetInstance.swift new file mode 100644 index 000000000..5aea70e84 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsGetInstance.swift @@ -0,0 +1,242 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.PreReleaseVersions { + + public enum PreReleaseVersionsGetInstance { + + public static let service = APIService(id: "preReleaseVersions-get_instance", tag: "PreReleaseVersions", method: "GET", path: "/v1/preReleaseVersions/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type preReleaseVersions */ + public enum FieldspreReleaseVersions: String, Codable, Equatable, CaseIterable { + case app = "app" + case builds = "builds" + case platform = "platform" + case version = "version" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case app = "app" + case builds = "builds" + } + + /** the fields to include for returned resources of type builds */ + public enum Fieldsbuilds: String, Codable, Equatable, CaseIterable { + case app = "app" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case appStoreVersion = "appStoreVersion" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case betaBuildLocalizations = "betaBuildLocalizations" + case betaGroups = "betaGroups" + case buildBetaDetail = "buildBetaDetail" + case diagnosticSignatures = "diagnosticSignatures" + case expirationDate = "expirationDate" + case expired = "expired" + case iconAssetToken = "iconAssetToken" + case icons = "icons" + case individualTesters = "individualTesters" + case minOsVersion = "minOsVersion" + case perfPowerMetrics = "perfPowerMetrics" + case preReleaseVersion = "preReleaseVersion" + case processingState = "processingState" + case uploadedDate = "uploadedDate" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case version = "version" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type preReleaseVersions */ + public var fieldspreReleaseVersions: [FieldspreReleaseVersions]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type builds */ + public var fieldsbuilds: [Fieldsbuilds]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum number of related builds returned (when they are included) */ + public var limitbuilds: Int? + + public init(id: String, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbuilds: Int? = nil) { + self.id = id + self.fieldspreReleaseVersions = fieldspreReleaseVersions + self.include = include + self.fieldsbuilds = fieldsbuilds + self.fieldsapps = fieldsapps + self.limitbuilds = limitbuilds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: PreReleaseVersionsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldspreReleaseVersions: [FieldspreReleaseVersions]? = nil, include: [Include]? = nil, fieldsbuilds: [Fieldsbuilds]? = nil, fieldsapps: [Fieldsapps]? = nil, limitbuilds: Int? = nil) { + let options = Options(id: id, fieldspreReleaseVersions: fieldspreReleaseVersions, include: include, fieldsbuilds: fieldsbuilds, fieldsapps: fieldsapps, limitbuilds: limitbuilds) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldspreReleaseVersions = options.fieldspreReleaseVersions?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[preReleaseVersions]"] = fieldspreReleaseVersions + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsbuilds = options.fieldsbuilds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[builds]"] = fieldsbuilds + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limitbuilds = options.limitbuilds { + params["limit[builds]"] = limitbuilds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = PrereleaseVersionResponse + + /** Single PrereleaseVersion */ + case status200(PrereleaseVersionResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: PrereleaseVersionResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(PrereleaseVersionResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesBundleIdGetToOneRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesBundleIdGetToOneRelated.swift new file mode 100644 index 000000000..7d2b66ed6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesBundleIdGetToOneRelated.swift @@ -0,0 +1,160 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Profiles { + + public enum ProfilesBundleIdGetToOneRelated { + + public static let service = APIService(id: "profiles-bundleId-get_to_one_related", tag: "Profiles", method: "GET", path: "/v1/profiles/{id}/bundleId", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type bundleIds */ + public enum FieldsbundleIds: String, Codable, Equatable, CaseIterable { + case app = "app" + case bundleIdCapabilities = "bundleIdCapabilities" + case identifier = "identifier" + case name = "name" + case platform = "platform" + case profiles = "profiles" + case seedId = "seedId" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type bundleIds */ + public var fieldsbundleIds: [FieldsbundleIds]? + + public init(id: String, fieldsbundleIds: [FieldsbundleIds]? = nil) { + self.id = id + self.fieldsbundleIds = fieldsbundleIds + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: ProfilesBundleIdGetToOneRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsbundleIds: [FieldsbundleIds]? = nil) { + let options = Options(id: id, fieldsbundleIds: fieldsbundleIds) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsbundleIds = options.fieldsbundleIds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[bundleIds]"] = fieldsbundleIds + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = BundleIdResponse + + /** Related resource */ + case status200(BundleIdResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: BundleIdResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(BundleIdResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesCertificatesGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesCertificatesGetToManyRelated.swift new file mode 100644 index 000000000..c9ed865aa --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesCertificatesGetToManyRelated.swift @@ -0,0 +1,168 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Profiles { + + public enum ProfilesCertificatesGetToManyRelated { + + public static let service = APIService(id: "profiles-certificates-get_to_many_related", tag: "Profiles", method: "GET", path: "/v1/profiles/{id}/certificates", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type certificates */ + public enum Fieldscertificates: String, Codable, Equatable, CaseIterable { + case certificateContent = "certificateContent" + case certificateType = "certificateType" + case csrContent = "csrContent" + case displayName = "displayName" + case expirationDate = "expirationDate" + case name = "name" + case platform = "platform" + case serialNumber = "serialNumber" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type certificates */ + public var fieldscertificates: [Fieldscertificates]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldscertificates: [Fieldscertificates]? = nil, limit: Int? = nil) { + self.id = id + self.fieldscertificates = fieldscertificates + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: ProfilesCertificatesGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldscertificates: [Fieldscertificates]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldscertificates: fieldscertificates, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldscertificates = options.fieldscertificates?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[certificates]"] = fieldscertificates + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = CertificatesResponse + + /** List of related resources */ + case status200(CertificatesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: CertificatesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(CertificatesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesCreateInstance.swift new file mode 100644 index 000000000..9b4a2fe4d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Profiles { + + public enum ProfilesCreateInstance { + + public static let service = APIService(id: "profiles-create_instance", tag: "Profiles", method: "POST", path: "/v1/profiles", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: ProfileCreateRequest + + public init(body: ProfileCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: ProfilesCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = ProfileResponse + + /** Single Profile */ + case status201(ProfileResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: ProfileResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(ProfileResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesDeleteInstance.swift new file mode 100644 index 000000000..3557df6a6 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Profiles { + + public enum ProfilesDeleteInstance { + + public static let service = APIService(id: "profiles-delete_instance", tag: "Profiles", method: "DELETE", path: "/v1/profiles/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: ProfilesDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesDevicesGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesDevicesGetToManyRelated.swift new file mode 100644 index 000000000..819f793b0 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesDevicesGetToManyRelated.swift @@ -0,0 +1,167 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Profiles { + + public enum ProfilesDevicesGetToManyRelated { + + public static let service = APIService(id: "profiles-devices-get_to_many_related", tag: "Profiles", method: "GET", path: "/v1/profiles/{id}/devices", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type devices */ + public enum Fieldsdevices: String, Codable, Equatable, CaseIterable { + case addedDate = "addedDate" + case deviceClass = "deviceClass" + case model = "model" + case name = "name" + case platform = "platform" + case status = "status" + case udid = "udid" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type devices */ + public var fieldsdevices: [Fieldsdevices]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsdevices: [Fieldsdevices]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsdevices = fieldsdevices + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: ProfilesDevicesGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsdevices: [Fieldsdevices]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsdevices: fieldsdevices, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsdevices = options.fieldsdevices?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[devices]"] = fieldsdevices + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = DevicesResponse + + /** List of related resources */ + case status200(DevicesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: DevicesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(DevicesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesGetCollection.swift new file mode 100644 index 000000000..14f84143a --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesGetCollection.swift @@ -0,0 +1,309 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Profiles { + + public enum ProfilesGetCollection { + + public static let service = APIService(id: "profiles-get_collection", tag: "Profiles", method: "GET", path: "/v1/profiles", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'profileState' */ + public enum FilterprofileState: String, Codable, Equatable, CaseIterable { + case active = "ACTIVE" + case invalid = "INVALID" + } + + /** filter by attribute 'profileType' */ + public enum FilterprofileType: String, Codable, Equatable, CaseIterable { + case iosAppDevelopment = "IOS_APP_DEVELOPMENT" + case iosAppStore = "IOS_APP_STORE" + case iosAppAdhoc = "IOS_APP_ADHOC" + case iosAppInhouse = "IOS_APP_INHOUSE" + case macAppDevelopment = "MAC_APP_DEVELOPMENT" + case macAppStore = "MAC_APP_STORE" + case macAppDirect = "MAC_APP_DIRECT" + case tvosAppDevelopment = "TVOS_APP_DEVELOPMENT" + case tvosAppStore = "TVOS_APP_STORE" + case tvosAppAdhoc = "TVOS_APP_ADHOC" + case tvosAppInhouse = "TVOS_APP_INHOUSE" + case macCatalystAppDevelopment = "MAC_CATALYST_APP_DEVELOPMENT" + case macCatalystAppStore = "MAC_CATALYST_APP_STORE" + case macCatalystAppDirect = "MAC_CATALYST_APP_DIRECT" + } + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public enum Sort: String, Codable, Equatable, CaseIterable { + case id = "id" + case id = "-id" + case name = "name" + case name = "-name" + case profileState = "profileState" + case profileState = "-profileState" + case profileType = "profileType" + case profileType = "-profileType" + } + + /** the fields to include for returned resources of type profiles */ + public enum Fieldsprofiles: String, Codable, Equatable, CaseIterable { + case bundleId = "bundleId" + case certificates = "certificates" + case createdDate = "createdDate" + case devices = "devices" + case expirationDate = "expirationDate" + case name = "name" + case platform = "platform" + case profileContent = "profileContent" + case profileState = "profileState" + case profileType = "profileType" + case uuid = "uuid" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case bundleId = "bundleId" + case certificates = "certificates" + case devices = "devices" + } + + /** the fields to include for returned resources of type certificates */ + public enum Fieldscertificates: String, Codable, Equatable, CaseIterable { + case certificateContent = "certificateContent" + case certificateType = "certificateType" + case csrContent = "csrContent" + case displayName = "displayName" + case expirationDate = "expirationDate" + case name = "name" + case platform = "platform" + case serialNumber = "serialNumber" + } + + /** the fields to include for returned resources of type devices */ + public enum Fieldsdevices: String, Codable, Equatable, CaseIterable { + case addedDate = "addedDate" + case deviceClass = "deviceClass" + case model = "model" + case name = "name" + case platform = "platform" + case status = "status" + case udid = "udid" + } + + /** the fields to include for returned resources of type bundleIds */ + public enum FieldsbundleIds: String, Codable, Equatable, CaseIterable { + case app = "app" + case bundleIdCapabilities = "bundleIdCapabilities" + case identifier = "identifier" + case name = "name" + case platform = "platform" + case profiles = "profiles" + case seedId = "seedId" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'name' */ + public var filtername: [String]? + + /** filter by attribute 'profileState' */ + public var filterprofileState: [FilterprofileState]? + + /** filter by attribute 'profileType' */ + public var filterprofileType: [FilterprofileType]? + + /** filter by id(s) */ + public var filterid: [String]? + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public var sort: [Sort]? + + /** the fields to include for returned resources of type profiles */ + public var fieldsprofiles: [Fieldsprofiles]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type certificates */ + public var fieldscertificates: [Fieldscertificates]? + + /** the fields to include for returned resources of type devices */ + public var fieldsdevices: [Fieldsdevices]? + + /** the fields to include for returned resources of type bundleIds */ + public var fieldsbundleIds: [FieldsbundleIds]? + + /** maximum number of related certificates returned (when they are included) */ + public var limitcertificates: Int? + + /** maximum number of related devices returned (when they are included) */ + public var limitdevices: Int? + + public init(filtername: [String]? = nil, filterprofileState: [FilterprofileState]? = nil, filterprofileType: [FilterprofileType]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldsprofiles: [Fieldsprofiles]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldscertificates: [Fieldscertificates]? = nil, fieldsdevices: [Fieldsdevices]? = nil, fieldsbundleIds: [FieldsbundleIds]? = nil, limitcertificates: Int? = nil, limitdevices: Int? = nil) { + self.filtername = filtername + self.filterprofileState = filterprofileState + self.filterprofileType = filterprofileType + self.filterid = filterid + self.sort = sort + self.fieldsprofiles = fieldsprofiles + self.limit = limit + self.include = include + self.fieldscertificates = fieldscertificates + self.fieldsdevices = fieldsdevices + self.fieldsbundleIds = fieldsbundleIds + self.limitcertificates = limitcertificates + self.limitdevices = limitdevices + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: ProfilesGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filtername: [String]? = nil, filterprofileState: [FilterprofileState]? = nil, filterprofileType: [FilterprofileType]? = nil, filterid: [String]? = nil, sort: [Sort]? = nil, fieldsprofiles: [Fieldsprofiles]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldscertificates: [Fieldscertificates]? = nil, fieldsdevices: [Fieldsdevices]? = nil, fieldsbundleIds: [FieldsbundleIds]? = nil, limitcertificates: Int? = nil, limitdevices: Int? = nil) { + let options = Options(filtername: filtername, filterprofileState: filterprofileState, filterprofileType: filterprofileType, filterid: filterid, sort: sort, fieldsprofiles: fieldsprofiles, limit: limit, include: include, fieldscertificates: fieldscertificates, fieldsdevices: fieldsdevices, fieldsbundleIds: fieldsbundleIds, limitcertificates: limitcertificates, limitdevices: limitdevices) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filtername = options.filtername?.joined(separator: ",") { + params["filter[name]"] = filtername + } + if let filterprofileState = options.filterprofileState?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[profileState]"] = filterprofileState + } + if let filterprofileType = options.filterprofileType?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[profileType]"] = filterprofileType + } + if let filterid = options.filterid?.joined(separator: ",") { + params["filter[id]"] = filterid + } + if let sort = options.sort?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["sort"] = sort + } + if let fieldsprofiles = options.fieldsprofiles?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[profiles]"] = fieldsprofiles + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldscertificates = options.fieldscertificates?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[certificates]"] = fieldscertificates + } + if let fieldsdevices = options.fieldsdevices?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[devices]"] = fieldsdevices + } + if let fieldsbundleIds = options.fieldsbundleIds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[bundleIds]"] = fieldsbundleIds + } + if let limitcertificates = options.limitcertificates { + params["limit[certificates]"] = limitcertificates + } + if let limitdevices = options.limitdevices { + params["limit[devices]"] = limitdevices + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = ProfilesResponse + + /** List of Profiles */ + case status200(ProfilesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: ProfilesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(ProfilesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesGetInstance.swift new file mode 100644 index 000000000..03fe0852d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesGetInstance.swift @@ -0,0 +1,247 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Profiles { + + public enum ProfilesGetInstance { + + public static let service = APIService(id: "profiles-get_instance", tag: "Profiles", method: "GET", path: "/v1/profiles/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type profiles */ + public enum Fieldsprofiles: String, Codable, Equatable, CaseIterable { + case bundleId = "bundleId" + case certificates = "certificates" + case createdDate = "createdDate" + case devices = "devices" + case expirationDate = "expirationDate" + case name = "name" + case platform = "platform" + case profileContent = "profileContent" + case profileState = "profileState" + case profileType = "profileType" + case uuid = "uuid" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case bundleId = "bundleId" + case certificates = "certificates" + case devices = "devices" + } + + /** the fields to include for returned resources of type certificates */ + public enum Fieldscertificates: String, Codable, Equatable, CaseIterable { + case certificateContent = "certificateContent" + case certificateType = "certificateType" + case csrContent = "csrContent" + case displayName = "displayName" + case expirationDate = "expirationDate" + case name = "name" + case platform = "platform" + case serialNumber = "serialNumber" + } + + /** the fields to include for returned resources of type devices */ + public enum Fieldsdevices: String, Codable, Equatable, CaseIterable { + case addedDate = "addedDate" + case deviceClass = "deviceClass" + case model = "model" + case name = "name" + case platform = "platform" + case status = "status" + case udid = "udid" + } + + /** the fields to include for returned resources of type bundleIds */ + public enum FieldsbundleIds: String, Codable, Equatable, CaseIterable { + case app = "app" + case bundleIdCapabilities = "bundleIdCapabilities" + case identifier = "identifier" + case name = "name" + case platform = "platform" + case profiles = "profiles" + case seedId = "seedId" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type profiles */ + public var fieldsprofiles: [Fieldsprofiles]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type certificates */ + public var fieldscertificates: [Fieldscertificates]? + + /** the fields to include for returned resources of type devices */ + public var fieldsdevices: [Fieldsdevices]? + + /** the fields to include for returned resources of type bundleIds */ + public var fieldsbundleIds: [FieldsbundleIds]? + + /** maximum number of related certificates returned (when they are included) */ + public var limitcertificates: Int? + + /** maximum number of related devices returned (when they are included) */ + public var limitdevices: Int? + + public init(id: String, fieldsprofiles: [Fieldsprofiles]? = nil, include: [Include]? = nil, fieldscertificates: [Fieldscertificates]? = nil, fieldsdevices: [Fieldsdevices]? = nil, fieldsbundleIds: [FieldsbundleIds]? = nil, limitcertificates: Int? = nil, limitdevices: Int? = nil) { + self.id = id + self.fieldsprofiles = fieldsprofiles + self.include = include + self.fieldscertificates = fieldscertificates + self.fieldsdevices = fieldsdevices + self.fieldsbundleIds = fieldsbundleIds + self.limitcertificates = limitcertificates + self.limitdevices = limitdevices + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: ProfilesGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsprofiles: [Fieldsprofiles]? = nil, include: [Include]? = nil, fieldscertificates: [Fieldscertificates]? = nil, fieldsdevices: [Fieldsdevices]? = nil, fieldsbundleIds: [FieldsbundleIds]? = nil, limitcertificates: Int? = nil, limitdevices: Int? = nil) { + let options = Options(id: id, fieldsprofiles: fieldsprofiles, include: include, fieldscertificates: fieldscertificates, fieldsdevices: fieldsdevices, fieldsbundleIds: fieldsbundleIds, limitcertificates: limitcertificates, limitdevices: limitdevices) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsprofiles = options.fieldsprofiles?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[profiles]"] = fieldsprofiles + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldscertificates = options.fieldscertificates?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[certificates]"] = fieldscertificates + } + if let fieldsdevices = options.fieldsdevices?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[devices]"] = fieldsdevices + } + if let fieldsbundleIds = options.fieldsbundleIds?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[bundleIds]"] = fieldsbundleIds + } + if let limitcertificates = options.limitcertificates { + params["limit[certificates]"] = limitcertificates + } + if let limitdevices = options.limitdevices { + params["limit[devices]"] = limitdevices + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = ProfileResponse + + /** Single Profile */ + case status200(ProfileResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: ProfileResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(ProfileResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesCreateInstance.swift new file mode 100644 index 000000000..9f2329c86 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.RoutingAppCoverages { + + public enum RoutingAppCoveragesCreateInstance { + + public static let service = APIService(id: "routingAppCoverages-create_instance", tag: "RoutingAppCoverages", method: "POST", path: "/v1/routingAppCoverages", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: RoutingAppCoverageCreateRequest + + public init(body: RoutingAppCoverageCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: RoutingAppCoveragesCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = RoutingAppCoverageResponse + + /** Single RoutingAppCoverage */ + case status201(RoutingAppCoverageResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: RoutingAppCoverageResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(RoutingAppCoverageResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesDeleteInstance.swift new file mode 100644 index 000000000..1af1e515d --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.RoutingAppCoverages { + + public enum RoutingAppCoveragesDeleteInstance { + + public static let service = APIService(id: "routingAppCoverages-delete_instance", tag: "RoutingAppCoverages", method: "DELETE", path: "/v1/routingAppCoverages/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: RoutingAppCoveragesDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesGetInstance.swift new file mode 100644 index 000000000..56b66fb11 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesGetInstance.swift @@ -0,0 +1,172 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.RoutingAppCoverages { + + public enum RoutingAppCoveragesGetInstance { + + public static let service = APIService(id: "routingAppCoverages-get_instance", tag: "RoutingAppCoverages", method: "GET", path: "/v1/routingAppCoverages/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type routingAppCoverages */ + public enum FieldsroutingAppCoverages: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + case assetDeliveryState = "assetDeliveryState" + case fileName = "fileName" + case fileSize = "fileSize" + case sourceFileChecksum = "sourceFileChecksum" + case uploadOperations = "uploadOperations" + case uploaded = "uploaded" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case appStoreVersion = "appStoreVersion" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type routingAppCoverages */ + public var fieldsroutingAppCoverages: [FieldsroutingAppCoverages]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + public init(id: String, fieldsroutingAppCoverages: [FieldsroutingAppCoverages]? = nil, include: [Include]? = nil) { + self.id = id + self.fieldsroutingAppCoverages = fieldsroutingAppCoverages + self.include = include + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: RoutingAppCoveragesGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsroutingAppCoverages: [FieldsroutingAppCoverages]? = nil, include: [Include]? = nil) { + let options = Options(id: id, fieldsroutingAppCoverages: fieldsroutingAppCoverages, include: include) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsroutingAppCoverages = options.fieldsroutingAppCoverages?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[routingAppCoverages]"] = fieldsroutingAppCoverages + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = RoutingAppCoverageResponse + + /** Single RoutingAppCoverage */ + case status200(RoutingAppCoverageResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: RoutingAppCoverageResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(RoutingAppCoverageResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesUpdateInstance.swift new file mode 100644 index 000000000..31dd93805 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/RoutingAppCoverages/RoutingAppCoveragesUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.RoutingAppCoverages { + + public enum RoutingAppCoveragesUpdateInstance { + + public static let service = APIService(id: "routingAppCoverages-update_instance", tag: "RoutingAppCoverages", method: "PATCH", path: "/v1/routingAppCoverages/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: RoutingAppCoverageUpdateRequest + + public init(body: RoutingAppCoverageUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: RoutingAppCoveragesUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: RoutingAppCoverageUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = RoutingAppCoverageResponse + + /** Single RoutingAppCoverage */ + case status200(RoutingAppCoverageResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: RoutingAppCoverageResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(RoutingAppCoverageResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/SalesReports/SalesReportsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/SalesReports/SalesReportsGetCollection.swift new file mode 100644 index 000000000..7bd8757cf --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/SalesReports/SalesReportsGetCollection.swift @@ -0,0 +1,185 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.SalesReports { + + public enum SalesReportsGetCollection { + + public static let service = APIService(id: "salesReports-get_collection", tag: "SalesReports", method: "GET", path: "/v1/salesReports", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'frequency' */ + public enum Filterfrequency: String, Codable, Equatable, CaseIterable { + case daily = "DAILY" + case weekly = "WEEKLY" + case monthly = "MONTHLY" + case yearly = "YEARLY" + } + + /** filter by attribute 'reportSubType' */ + public enum FilterreportSubType: String, Codable, Equatable, CaseIterable { + case summary = "SUMMARY" + case detailed = "DETAILED" + case optIn = "OPT_IN" + } + + /** filter by attribute 'reportType' */ + public enum FilterreportType: String, Codable, Equatable, CaseIterable { + case sales = "SALES" + case preOrder = "PRE_ORDER" + case newsstand = "NEWSSTAND" + case subscription = "SUBSCRIPTION" + case subscriptionEvent = "SUBSCRIPTION_EVENT" + case subscriber = "SUBSCRIBER" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'frequency' */ + public var filterfrequency: [Filterfrequency] + + /** filter by attribute 'reportDate' */ + public var filterreportDate: [String]? + + /** filter by attribute 'reportSubType' */ + public var filterreportSubType: [FilterreportSubType] + + /** filter by attribute 'reportType' */ + public var filterreportType: [FilterreportType] + + /** filter by attribute 'vendorNumber' */ + public var filtervendorNumber: [String] + + /** filter by attribute 'version' */ + public var filterversion: [String]? + + public init(filterfrequency: [Filterfrequency], filterreportDate: [String]? = nil, filterreportSubType: [FilterreportSubType], filterreportType: [FilterreportType], filtervendorNumber: [String], filterversion: [String]? = nil) { + self.filterfrequency = filterfrequency + self.filterreportDate = filterreportDate + self.filterreportSubType = filterreportSubType + self.filterreportType = filterreportType + self.filtervendorNumber = filtervendorNumber + self.filterversion = filterversion + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: SalesReportsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterfrequency: [Filterfrequency], filterreportDate: [String]? = nil, filterreportSubType: [FilterreportSubType], filterreportType: [FilterreportType], filtervendorNumber: [String], filterversion: [String]? = nil) { + let options = Options(filterfrequency: filterfrequency, filterreportDate: filterreportDate, filterreportSubType: filterreportSubType, filterreportType: filterreportType, filtervendorNumber: filtervendorNumber, filterversion: filterversion) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + params["filter[frequency]"] = options.filterfrequency.encode().map({ String(describing: $0) }).joined(separator: ",") + if let filterreportDate = options.filterreportDate?.joined(separator: ",") { + params["filter[reportDate]"] = filterreportDate + } + params["filter[reportSubType]"] = options.filterreportSubType.encode().map({ String(describing: $0) }).joined(separator: ",") + params["filter[reportType]"] = options.filterreportType.encode().map({ String(describing: $0) }).joined(separator: ",") + params["filter[vendorNumber]"] = options.filtervendorNumber.joined(separator: ",") + if let filterversion = options.filterversion?.joined(separator: ",") { + params["filter[version]"] = filterversion + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = File + + /** List of SalesReports */ + case status200(File) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: File? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(File.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Territories/TerritoriesGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Territories/TerritoriesGetCollection.swift new file mode 100644 index 000000000..38c0af8ae --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Territories/TerritoriesGetCollection.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Territories { + + public enum TerritoriesGetCollection { + + public static let service = APIService(id: "territories-get_collection", tag: "Territories", method: "GET", path: "/v1/territories", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type territories */ + public enum Fieldsterritories: String, Codable, Equatable, CaseIterable { + case currency = "currency" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the fields to include for returned resources of type territories */ + public var fieldsterritories: [Fieldsterritories]? + + /** maximum resources per page */ + public var limit: Int? + + public init(fieldsterritories: [Fieldsterritories]? = nil, limit: Int? = nil) { + self.fieldsterritories = fieldsterritories + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: TerritoriesGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(fieldsterritories: [Fieldsterritories]? = nil, limit: Int? = nil) { + let options = Options(fieldsterritories: fieldsterritories, limit: limit) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsterritories = options.fieldsterritories?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[territories]"] = fieldsterritories + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = TerritoriesResponse + + /** List of Territories */ + case status200(TerritoriesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: TerritoriesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(TerritoriesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsCreateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsCreateInstance.swift new file mode 100644 index 000000000..689e0296e --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsCreateInstance.swift @@ -0,0 +1,119 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.UserInvitations { + + public enum UserInvitationsCreateInstance { + + public static let service = APIService(id: "userInvitations-create_instance", tag: "UserInvitations", method: "POST", path: "/v1/userInvitations", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public var body: UserInvitationCreateRequest + + public init(body: UserInvitationCreateRequest, encoder: RequestEncoder? = nil) { + self.body = body + super.init(service: UserInvitationsCreateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = UserInvitationResponse + + /** Single UserInvitation */ + case status201(UserInvitationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: UserInvitationResponse? { + switch self { + case .status201(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status201(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status201: return 201 + case .status400: return 400 + case .status403: return 403 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status201: return true + case .status400: return false + case .status403: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 201: self = try .status201(decoder.decode(UserInvitationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsDeleteInstance.swift new file mode 100644 index 000000000..cfd5079b0 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.UserInvitations { + + public enum UserInvitationsDeleteInstance { + + public static let service = APIService(id: "userInvitations-delete_instance", tag: "UserInvitations", method: "DELETE", path: "/v1/userInvitations/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: UserInvitationsDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsGetCollection.swift new file mode 100644 index 000000000..dd7b41261 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsGetCollection.swift @@ -0,0 +1,256 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.UserInvitations { + + public enum UserInvitationsGetCollection { + + public static let service = APIService(id: "userInvitations-get_collection", tag: "UserInvitations", method: "GET", path: "/v1/userInvitations", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'roles' */ + public enum Filterroles: String, Codable, Equatable, CaseIterable { + case admin = "ADMIN" + case finance = "FINANCE" + case technical = "TECHNICAL" + case accountHolder = "ACCOUNT_HOLDER" + case readOnly = "READ_ONLY" + case sales = "SALES" + case marketing = "MARKETING" + case appManager = "APP_MANAGER" + case developer = "DEVELOPER" + case accessToReports = "ACCESS_TO_REPORTS" + case customerSupport = "CUSTOMER_SUPPORT" + } + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public enum Sort: String, Codable, Equatable, CaseIterable { + case email = "email" + case email = "-email" + case lastName = "lastName" + case lastName = "-lastName" + } + + /** the fields to include for returned resources of type userInvitations */ + public enum FieldsuserInvitations: String, Codable, Equatable, CaseIterable { + case allAppsVisible = "allAppsVisible" + case email = "email" + case expirationDate = "expirationDate" + case firstName = "firstName" + case lastName = "lastName" + case provisioningAllowed = "provisioningAllowed" + case roles = "roles" + case visibleApps = "visibleApps" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case visibleApps = "visibleApps" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'email' */ + public var filteremail: [String]? + + /** filter by attribute 'roles' */ + public var filterroles: [Filterroles]? + + /** filter by id(s) of related 'visibleApps' */ + public var filtervisibleApps: [String]? + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public var sort: [Sort]? + + /** the fields to include for returned resources of type userInvitations */ + public var fieldsuserInvitations: [FieldsuserInvitations]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum number of related visibleApps returned (when they are included) */ + public var limitvisibleApps: Int? + + public init(filteremail: [String]? = nil, filterroles: [Filterroles]? = nil, filtervisibleApps: [String]? = nil, sort: [Sort]? = nil, fieldsuserInvitations: [FieldsuserInvitations]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil, limitvisibleApps: Int? = nil) { + self.filteremail = filteremail + self.filterroles = filterroles + self.filtervisibleApps = filtervisibleApps + self.sort = sort + self.fieldsuserInvitations = fieldsuserInvitations + self.limit = limit + self.include = include + self.fieldsapps = fieldsapps + self.limitvisibleApps = limitvisibleApps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: UserInvitationsGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filteremail: [String]? = nil, filterroles: [Filterroles]? = nil, filtervisibleApps: [String]? = nil, sort: [Sort]? = nil, fieldsuserInvitations: [FieldsuserInvitations]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil, limitvisibleApps: Int? = nil) { + let options = Options(filteremail: filteremail, filterroles: filterroles, filtervisibleApps: filtervisibleApps, sort: sort, fieldsuserInvitations: fieldsuserInvitations, limit: limit, include: include, fieldsapps: fieldsapps, limitvisibleApps: limitvisibleApps) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filteremail = options.filteremail?.joined(separator: ",") { + params["filter[email]"] = filteremail + } + if let filterroles = options.filterroles?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[roles]"] = filterroles + } + if let filtervisibleApps = options.filtervisibleApps?.joined(separator: ",") { + params["filter[visibleApps]"] = filtervisibleApps + } + if let sort = options.sort?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["sort"] = sort + } + if let fieldsuserInvitations = options.fieldsuserInvitations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[userInvitations]"] = fieldsuserInvitations + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limitvisibleApps = options.limitvisibleApps { + params["limit[visibleApps]"] = limitvisibleApps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = UserInvitationsResponse + + /** List of UserInvitations */ + case status200(UserInvitationsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: UserInvitationsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(UserInvitationsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsGetInstance.swift new file mode 100644 index 000000000..2c577cf88 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsGetInstance.swift @@ -0,0 +1,214 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.UserInvitations { + + public enum UserInvitationsGetInstance { + + public static let service = APIService(id: "userInvitations-get_instance", tag: "UserInvitations", method: "GET", path: "/v1/userInvitations/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type userInvitations */ + public enum FieldsuserInvitations: String, Codable, Equatable, CaseIterable { + case allAppsVisible = "allAppsVisible" + case email = "email" + case expirationDate = "expirationDate" + case firstName = "firstName" + case lastName = "lastName" + case provisioningAllowed = "provisioningAllowed" + case roles = "roles" + case visibleApps = "visibleApps" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case visibleApps = "visibleApps" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type userInvitations */ + public var fieldsuserInvitations: [FieldsuserInvitations]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum number of related visibleApps returned (when they are included) */ + public var limitvisibleApps: Int? + + public init(id: String, fieldsuserInvitations: [FieldsuserInvitations]? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil, limitvisibleApps: Int? = nil) { + self.id = id + self.fieldsuserInvitations = fieldsuserInvitations + self.include = include + self.fieldsapps = fieldsapps + self.limitvisibleApps = limitvisibleApps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: UserInvitationsGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsuserInvitations: [FieldsuserInvitations]? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil, limitvisibleApps: Int? = nil) { + let options = Options(id: id, fieldsuserInvitations: fieldsuserInvitations, include: include, fieldsapps: fieldsapps, limitvisibleApps: limitvisibleApps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsuserInvitations = options.fieldsuserInvitations?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[userInvitations]"] = fieldsuserInvitations + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limitvisibleApps = options.limitvisibleApps { + params["limit[visibleApps]"] = limitvisibleApps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = UserInvitationResponse + + /** Single UserInvitation */ + case status200(UserInvitationResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: UserInvitationResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(UserInvitationResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsVisibleAppsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsVisibleAppsGetToManyRelated.swift new file mode 100644 index 000000000..0ba545d41 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsVisibleAppsGetToManyRelated.swift @@ -0,0 +1,183 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.UserInvitations { + + public enum UserInvitationsVisibleAppsGetToManyRelated { + + public static let service = APIService(id: "userInvitations-visibleApps-get_to_many_related", tag: "UserInvitations", method: "GET", path: "/v1/userInvitations/{id}/visibleApps", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsapps = fieldsapps + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: UserInvitationsVisibleAppsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsapps: fieldsapps, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppsResponse + + /** List of related resources */ + case status200(AppsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersDeleteInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersDeleteInstance.swift new file mode 100644 index 000000000..00b1e8420 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersDeleteInstance.swift @@ -0,0 +1,145 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Users { + + public enum UsersDeleteInstance { + + public static let service = APIService(id: "users-delete_instance", tag: "Users", method: "DELETE", path: "/v1/users/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: UsersDeleteInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String) { + let options = Options(id: id) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersGetCollection.swift new file mode 100644 index 000000000..f5d1f0e8a --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersGetCollection.swift @@ -0,0 +1,255 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Users { + + public enum UsersGetCollection { + + public static let service = APIService(id: "users-get_collection", tag: "Users", method: "GET", path: "/v1/users", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** filter by attribute 'roles' */ + public enum Filterroles: String, Codable, Equatable, CaseIterable { + case admin = "ADMIN" + case finance = "FINANCE" + case technical = "TECHNICAL" + case accountHolder = "ACCOUNT_HOLDER" + case readOnly = "READ_ONLY" + case sales = "SALES" + case marketing = "MARKETING" + case appManager = "APP_MANAGER" + case developer = "DEVELOPER" + case accessToReports = "ACCESS_TO_REPORTS" + case customerSupport = "CUSTOMER_SUPPORT" + } + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public enum Sort: String, Codable, Equatable, CaseIterable { + case lastName = "lastName" + case lastName = "-lastName" + case username = "username" + case username = "-username" + } + + /** the fields to include for returned resources of type users */ + public enum Fieldsusers: String, Codable, Equatable, CaseIterable { + case allAppsVisible = "allAppsVisible" + case firstName = "firstName" + case lastName = "lastName" + case provisioningAllowed = "provisioningAllowed" + case roles = "roles" + case username = "username" + case visibleApps = "visibleApps" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case visibleApps = "visibleApps" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** filter by attribute 'roles' */ + public var filterroles: [Filterroles]? + + /** filter by attribute 'username' */ + public var filterusername: [String]? + + /** filter by id(s) of related 'visibleApps' */ + public var filtervisibleApps: [String]? + + /** comma-separated list of sort expressions; resources will be sorted as specified */ + public var sort: [Sort]? + + /** the fields to include for returned resources of type users */ + public var fieldsusers: [Fieldsusers]? + + /** maximum resources per page */ + public var limit: Int? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum number of related visibleApps returned (when they are included) */ + public var limitvisibleApps: Int? + + public init(filterroles: [Filterroles]? = nil, filterusername: [String]? = nil, filtervisibleApps: [String]? = nil, sort: [Sort]? = nil, fieldsusers: [Fieldsusers]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil, limitvisibleApps: Int? = nil) { + self.filterroles = filterroles + self.filterusername = filterusername + self.filtervisibleApps = filtervisibleApps + self.sort = sort + self.fieldsusers = fieldsusers + self.limit = limit + self.include = include + self.fieldsapps = fieldsapps + self.limitvisibleApps = limitvisibleApps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: UsersGetCollection.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(filterroles: [Filterroles]? = nil, filterusername: [String]? = nil, filtervisibleApps: [String]? = nil, sort: [Sort]? = nil, fieldsusers: [Fieldsusers]? = nil, limit: Int? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil, limitvisibleApps: Int? = nil) { + let options = Options(filterroles: filterroles, filterusername: filterusername, filtervisibleApps: filtervisibleApps, sort: sort, fieldsusers: fieldsusers, limit: limit, include: include, fieldsapps: fieldsapps, limitvisibleApps: limitvisibleApps) + self.init(options: options) + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let filterroles = options.filterroles?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["filter[roles]"] = filterroles + } + if let filterusername = options.filterusername?.joined(separator: ",") { + params["filter[username]"] = filterusername + } + if let filtervisibleApps = options.filtervisibleApps?.joined(separator: ",") { + params["filter[visibleApps]"] = filtervisibleApps + } + if let sort = options.sort?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["sort"] = sort + } + if let fieldsusers = options.fieldsusers?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[users]"] = fieldsusers + } + if let limit = options.limit { + params["limit"] = limit + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limitvisibleApps = options.limitvisibleApps { + params["limit[visibleApps]"] = limitvisibleApps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = UsersResponse + + /** List of Users */ + case status200(UsersResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + public var success: UsersResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(UsersResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersGetInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersGetInstance.swift new file mode 100644 index 000000000..aad342209 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersGetInstance.swift @@ -0,0 +1,213 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Users { + + public enum UsersGetInstance { + + public static let service = APIService(id: "users-get_instance", tag: "Users", method: "GET", path: "/v1/users/{id}", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type users */ + public enum Fieldsusers: String, Codable, Equatable, CaseIterable { + case allAppsVisible = "allAppsVisible" + case firstName = "firstName" + case lastName = "lastName" + case provisioningAllowed = "provisioningAllowed" + case roles = "roles" + case username = "username" + case visibleApps = "visibleApps" + } + + /** comma-separated list of relationships to include */ + public enum Include: String, Codable, Equatable, CaseIterable { + case visibleApps = "visibleApps" + } + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type users */ + public var fieldsusers: [Fieldsusers]? + + /** comma-separated list of relationships to include */ + public var include: [Include]? + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum number of related visibleApps returned (when they are included) */ + public var limitvisibleApps: Int? + + public init(id: String, fieldsusers: [Fieldsusers]? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil, limitvisibleApps: Int? = nil) { + self.id = id + self.fieldsusers = fieldsusers + self.include = include + self.fieldsapps = fieldsapps + self.limitvisibleApps = limitvisibleApps + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: UsersGetInstance.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsusers: [Fieldsusers]? = nil, include: [Include]? = nil, fieldsapps: [Fieldsapps]? = nil, limitvisibleApps: Int? = nil) { + let options = Options(id: id, fieldsusers: fieldsusers, include: include, fieldsapps: fieldsapps, limitvisibleApps: limitvisibleApps) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsusers = options.fieldsusers?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[users]"] = fieldsusers + } + if let include = options.include?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["include"] = include + } + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limitvisibleApps = options.limitvisibleApps { + params["limit[visibleApps]"] = limitvisibleApps + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = UserResponse + + /** Single User */ + case status200(UserResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: UserResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(UserResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersUpdateInstance.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersUpdateInstance.swift new file mode 100644 index 000000000..8f854c190 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersUpdateInstance.swift @@ -0,0 +1,150 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Users { + + public enum UsersUpdateInstance { + + public static let service = APIService(id: "users-update_instance", tag: "Users", method: "PATCH", path: "/v1/users/{id}", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: UserUpdateRequest + + public init(body: UserUpdateRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: UsersUpdateInstance.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: UserUpdateRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = UserResponse + + /** Single User */ + case status200(UserResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: UserResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(UserResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsCreateToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsCreateToManyRelationship.swift new file mode 100644 index 000000000..4ec65bd27 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsCreateToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Users { + + public enum UsersVisibleAppsCreateToManyRelationship { + + public static let service = APIService(id: "users-visibleApps-create_to_many_relationship", tag: "Users", method: "POST", path: "/v1/users/{id}/relationships/visibleApps", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: UserVisibleAppsLinkagesRequest + + public init(body: UserVisibleAppsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: UsersVisibleAppsCreateToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: UserVisibleAppsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsDeleteToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsDeleteToManyRelationship.swift new file mode 100644 index 000000000..23c7df88b --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsDeleteToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Users { + + public enum UsersVisibleAppsDeleteToManyRelationship { + + public static let service = APIService(id: "users-visibleApps-delete_to_many_relationship", tag: "Users", method: "DELETE", path: "/v1/users/{id}/relationships/visibleApps", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: UserVisibleAppsLinkagesRequest + + public init(body: UserVisibleAppsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: UsersVisibleAppsDeleteToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: UserVisibleAppsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsGetToManyRelated.swift new file mode 100644 index 000000000..9f93a9841 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsGetToManyRelated.swift @@ -0,0 +1,183 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Users { + + public enum UsersVisibleAppsGetToManyRelated { + + public static let service = APIService(id: "users-visibleApps-get_to_many_related", tag: "Users", method: "GET", path: "/v1/users/{id}/visibleApps", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + /** the fields to include for returned resources of type apps */ + public enum Fieldsapps: String, Codable, Equatable, CaseIterable { + case appInfos = "appInfos" + case appStoreVersions = "appStoreVersions" + case availableInNewTerritories = "availableInNewTerritories" + case availableTerritories = "availableTerritories" + case betaAppLocalizations = "betaAppLocalizations" + case betaAppReviewDetail = "betaAppReviewDetail" + case betaGroups = "betaGroups" + case betaLicenseAgreement = "betaLicenseAgreement" + case betaTesters = "betaTesters" + case builds = "builds" + case bundleId = "bundleId" + case contentRightsDeclaration = "contentRightsDeclaration" + case endUserLicenseAgreement = "endUserLicenseAgreement" + case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case inAppPurchases = "inAppPurchases" + case isOrEverWasMadeForKids = "isOrEverWasMadeForKids" + case name = "name" + case perfPowerMetrics = "perfPowerMetrics" + case preOrder = "preOrder" + case preReleaseVersions = "preReleaseVersions" + case prices = "prices" + case primaryLocale = "primaryLocale" + case sku = "sku" + } + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** the fields to include for returned resources of type apps */ + public var fieldsapps: [Fieldsapps]? + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil) { + self.id = id + self.fieldsapps = fieldsapps + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: UsersVisibleAppsGetToManyRelated.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, fieldsapps: [Fieldsapps]? = nil, limit: Int? = nil) { + let options = Options(id: id, fieldsapps: fieldsapps, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let fieldsapps = options.fieldsapps?.encode().map({ String(describing: $0) }).joined(separator: ",") { + params["fields[apps]"] = fieldsapps + } + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = AppsResponse + + /** List of related resources */ + case status200(AppsResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: AppsResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(AppsResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsGetToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsGetToManyRelationship.swift new file mode 100644 index 000000000..786b8e6d3 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsGetToManyRelationship.swift @@ -0,0 +1,149 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Users { + + public enum UsersVisibleAppsGetToManyRelationship { + + public static let service = APIService(id: "users-visibleApps-get_to_many_relationship", tag: "Users", method: "GET", path: "/v1/users/{id}/relationships/visibleApps", hasBody: false, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + /** maximum resources per page */ + public var limit: Int? + + public init(id: String, limit: Int? = nil) { + self.id = id + self.limit = limit + } + } + + public var options: Options + + public init(options: Options) { + self.options = options + super.init(service: UsersVisibleAppsGetToManyRelationship.service) + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, limit: Int? = nil) { + let options = Options(id: id, limit: limit) + self.init(options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + + public override var queryParameters: [String: Any] { + var params: [String: Any] = [:] + if let limit = options.limit { + params["limit"] = limit + } + return params + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = UserVisibleAppsLinkagesResponse + + /** List of related linkages */ + case status200(UserVisibleAppsLinkagesResponse) + + /** Parameter error(s) */ + case status400(ErrorResponse) + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + public var success: UserVisibleAppsLinkagesResponse? { + switch self { + case .status200(let response): return response + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status200(let response): return response + case .status400(let response): return response + case .status403(let response): return response + case .status404(let response): return response + } + } + + public var statusCode: Int { + switch self { + case .status200: return 200 + case .status400: return 400 + case .status403: return 403 + case .status404: return 404 + } + } + + public var successful: Bool { + switch self { + case .status200: return true + case .status400: return false + case .status403: return false + case .status404: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 200: self = try .status200(decoder.decode(UserVisibleAppsLinkagesResponse.self, from: data)) + case 400: self = try .status400(decoder.decode(ErrorResponse.self, from: data)) + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsReplaceToManyRelationship.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsReplaceToManyRelationship.swift new file mode 100644 index 000000000..6862cb932 --- /dev/null +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersVisibleAppsReplaceToManyRelationship.swift @@ -0,0 +1,142 @@ +// +// Generated by SwagGen +// https://github.com/yonaskolb/SwagGen +// + +import Foundation + +extension AppStoreConnect.Users { + + public enum UsersVisibleAppsReplaceToManyRelationship { + + public static let service = APIService(id: "users-visibleApps-replace_to_many_relationship", tag: "Users", method: "PATCH", path: "/v1/users/{id}/relationships/visibleApps", hasBody: true, securityRequirements: [SecurityRequirement(type: "itc-bearer-token", scopes: [])]) + + public final class Request: APIRequest { + + public struct Options { + + /** the id of the requested resource */ + public var id: String + + public init(id: String) { + self.id = id + } + } + + public var options: Options + + public var body: UserVisibleAppsLinkagesRequest + + public init(body: UserVisibleAppsLinkagesRequest, options: Options, encoder: RequestEncoder? = nil) { + self.body = body + self.options = options + super.init(service: UsersVisibleAppsReplaceToManyRelationship.service) { defaultEncoder in + return try (encoder ?? defaultEncoder).encode(body) + } + } + + /// convenience initialiser so an Option doesn't have to be created + public convenience init(id: String, body: UserVisibleAppsLinkagesRequest) { + let options = Options(id: id) + self.init(body: body, options: options) + } + + public override var path: String { + return super.path.replacingOccurrences(of: "{" + "id" + "}", with: "\(self.options.id)") + } + } + + public enum Response: APIResponseValue, CustomStringConvertible, CustomDebugStringConvertible { + public typealias SuccessType = Void + + /** Success (no content) */ + case status204 + + /** Forbidden error */ + case status403(ErrorResponse) + + /** Not found error */ + case status404(ErrorResponse) + + /** Request entity error(s) */ + case status409(ErrorResponse) + + public var success: Void? { + switch self { + case .status204: return () + default: return nil + } + } + + public var failure: ErrorResponse? { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return nil + } + } + + /// either success or failure value. Success is anything in the 200..<300 status code range + public var responseResult: APIResponseResult { + if let successValue = success { + return .success(successValue) + } else if let failureValue = failure { + return .failure(failureValue) + } else { + fatalError("Response does not have success or failure response") + } + } + + public var response: Any { + switch self { + case .status403(let response): return response + case .status404(let response): return response + case .status409(let response): return response + default: return () + } + } + + public var statusCode: Int { + switch self { + case .status204: return 204 + case .status403: return 403 + case .status404: return 404 + case .status409: return 409 + } + } + + public var successful: Bool { + switch self { + case .status204: return true + case .status403: return false + case .status404: return false + case .status409: return false + } + } + + public init(statusCode: Int, data: Data, decoder: ResponseDecoder) throws { + switch statusCode { + case 204: self = .status204 + case 403: self = try .status403(decoder.decode(ErrorResponse.self, from: data)) + case 404: self = try .status404(decoder.decode(ErrorResponse.self, from: data)) + case 409: self = try .status409(decoder.decode(ErrorResponse.self, from: data)) + default: throw APIClientError.unexpectedStatusCode(statusCode: statusCode, data: data) + } + } + + public var description: String { + return "\(statusCode) \(successful ? "success" : "failure")" + } + + public var debugDescription: String { + var string = description + let responseString = "\(response)" + if responseString != "()" { + string += "\n\(responseString)" + } + return string + } + } + } +} diff --git a/Specs/AppStoreConnect/spec.json b/Specs/AppStoreConnect/spec.json new file mode 100644 index 000000000..12c7fef6e --- /dev/null +++ b/Specs/AppStoreConnect/spec.json @@ -0,0 +1,32545 @@ +{ + "openapi" : "3.0.1", + + "x-important" : "IMPORTANT: This OpenAPI Specification is only for use in accordance with the terms of the Apple Developer Program License Agreement and terms for the use of the App Store Connect API. You may not use this OpenAPI Specification unless you have agreed to the Apple Developer Program License Agreement, and You acknowledge and agree that the App Store Connect API (and use of this Specification in connection therewith) is for internal development, testing and reporting purposes within your team and not to provide services to any third parties or for any other use.", + + + "externalDocs" : { + "description": "App Store Connect API Documentation", + "url": "https://developer.apple.com/documentation/appstoreconnectapi" + }, + + + "info" : { + "title" : "App Store Connect API", + "version" : "1.2", + "x-platform" : "app_store_connect_api" + }, + + + "servers" : [ { + "url" : "https://api.appstoreconnect.apple.com/" + } ], + "paths" : { + "/v1/ageRatingDeclarations/{id}" : { + "patch" : { + "tags" : [ "AgeRatingDeclarations" ], + "operationId" : "ageRatingDeclarations-update_instance", + "requestBody" : { + "description" : "AgeRatingDeclaration representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AgeRatingDeclarationUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AgeRatingDeclaration", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AgeRatingDeclarationResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appCategories" : { + "get" : { + "tags" : [ "AppCategories" ], + "operationId" : "appCategories-get_collection", + "parameters" : [ { + "name" : "filter[platforms]", + "in" : "query", + "description" : "filter by attribute 'platforms'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IOS", "MAC_OS", "TV_OS" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "exists[parent]", + "in" : "query", + "description" : "filter by existence or non-existence of related 'parent'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appCategories]", + "in" : "query", + "description" : "the fields to include for returned resources of type appCategories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "parent", "platforms", "subcategories" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "parent", "subcategories" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[subcategories]", + "in" : "query", + "description" : "maximum number of related subcategories returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of AppCategories", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppCategoriesResponse" + } + } + } + } + } + } + }, + "/v1/appCategories/{id}" : { + "get" : { + "tags" : [ "AppCategories" ], + "operationId" : "appCategories-get_instance", + "parameters" : [ { + "name" : "fields[appCategories]", + "in" : "query", + "description" : "the fields to include for returned resources of type appCategories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "parent", "platforms", "subcategories" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "parent", "subcategories" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[subcategories]", + "in" : "query", + "description" : "maximum number of related subcategories returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppCategory", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppCategoryResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appEncryptionDeclarations" : { + "get" : { + "tags" : [ "AppEncryptionDeclarations" ], + "operationId" : "appEncryptionDeclarations-get_collection", + "parameters" : [ { + "name" : "filter[platform]", + "in" : "query", + "description" : "filter by attribute 'platform'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IOS", "MAC_OS", "TV_OS" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[app]", + "in" : "query", + "description" : "filter by id(s) of related 'app'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[builds]", + "in" : "query", + "description" : "filter by id(s) of related 'builds'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appEncryptionDeclarations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appEncryptionDeclarations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclarationState", "availableOnFrenchStore", "builds", "codeValue", "containsProprietaryCryptography", "containsThirdPartyCryptography", "documentName", "documentType", "documentUrl", "exempt", "platform", "uploadedDate", "usesEncryption" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of AppEncryptionDeclarations", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppEncryptionDeclarationsResponse" + } + } + } + } + } + } + }, + "/v1/appEncryptionDeclarations/{id}" : { + "get" : { + "tags" : [ "AppEncryptionDeclarations" ], + "operationId" : "appEncryptionDeclarations-get_instance", + "parameters" : [ { + "name" : "fields[appEncryptionDeclarations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appEncryptionDeclarations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclarationState", "availableOnFrenchStore", "builds", "codeValue", "containsProprietaryCryptography", "containsThirdPartyCryptography", "documentName", "documentType", "documentUrl", "exempt", "platform", "uploadedDate", "usesEncryption" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppEncryptionDeclaration", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppEncryptionDeclarationResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appInfoLocalizations" : { + "post" : { + "tags" : [ "AppInfoLocalizations" ], + "operationId" : "appInfoLocalizations-create_instance", + "requestBody" : { + "description" : "AppInfoLocalization representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfoLocalizationCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single AppInfoLocalization", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfoLocalizationResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/appInfoLocalizations/{id}" : { + "get" : { + "tags" : [ "AppInfoLocalizations" ], + "operationId" : "appInfoLocalizations-get_instance", + "parameters" : [ { + "name" : "fields[appInfoLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appInfoLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfo", "locale", "name", "privacyPolicyText", "privacyPolicyUrl", "subtitle" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfo" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppInfoLocalization", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfoLocalizationResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "AppInfoLocalizations" ], + "operationId" : "appInfoLocalizations-update_instance", + "requestBody" : { + "description" : "AppInfoLocalization representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfoLocalizationUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppInfoLocalization", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfoLocalizationResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "AppInfoLocalizations" ], + "operationId" : "appInfoLocalizations-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appInfos/{id}" : { + "get" : { + "tags" : [ "AppInfos" ], + "operationId" : "appInfos-get_instance", + "parameters" : [ { + "name" : "fields[appInfos]", + "in" : "query", + "description" : "the fields to include for returned resources of type appInfos", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appInfoLocalizations", "appStoreAgeRating", "appStoreState", "brazilAgeRating", "kidsAgeBand", "primaryCategory", "primarySubcategoryOne", "primarySubcategoryTwo", "secondaryCategory", "secondarySubcategoryOne", "secondarySubcategoryTwo" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appInfoLocalizations", "primaryCategory", "primarySubcategoryOne", "primarySubcategoryTwo", "secondaryCategory", "secondarySubcategoryOne", "secondarySubcategoryTwo" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appCategories]", + "in" : "query", + "description" : "the fields to include for returned resources of type appCategories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "parent", "platforms", "subcategories" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appInfoLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appInfoLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfo", "locale", "name", "privacyPolicyText", "privacyPolicyUrl", "subtitle" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[appInfoLocalizations]", + "in" : "query", + "description" : "maximum number of related appInfoLocalizations returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppInfo", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfoResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "AppInfos" ], + "operationId" : "appInfos-update_instance", + "requestBody" : { + "description" : "AppInfo representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfoUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppInfo", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfoResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appPreOrders" : { + "post" : { + "tags" : [ "AppPreOrders" ], + "operationId" : "appPreOrders-create_instance", + "requestBody" : { + "description" : "AppPreOrder representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreOrderCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single AppPreOrder", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreOrderResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/appPreOrders/{id}" : { + "get" : { + "tags" : [ "AppPreOrders" ], + "operationId" : "appPreOrders-get_instance", + "parameters" : [ { + "name" : "fields[appPreOrders]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPreOrders", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appReleaseDate", "preOrderAvailableDate" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppPreOrder", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreOrderResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "AppPreOrders" ], + "operationId" : "appPreOrders-update_instance", + "requestBody" : { + "description" : "AppPreOrder representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreOrderUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppPreOrder", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreOrderResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "AppPreOrders" ], + "operationId" : "appPreOrders-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appPreviewSets" : { + "post" : { + "tags" : [ "AppPreviewSets" ], + "operationId" : "appPreviewSets-create_instance", + "requestBody" : { + "description" : "AppPreviewSet representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreviewSetCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single AppPreviewSet", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreviewSetResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/appPreviewSets/{id}" : { + "get" : { + "tags" : [ "AppPreviewSets" ], + "operationId" : "appPreviewSets-get_instance", + "parameters" : [ { + "name" : "fields[appPreviewSets]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPreviewSets", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviews", "appStoreVersionLocalization", "previewType" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviews", "appStoreVersionLocalization" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appPreviews]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPreviews", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviewSet", "assetDeliveryState", "fileName", "fileSize", "mimeType", "previewFrameTimeCode", "previewImage", "sourceFileChecksum", "uploadOperations", "uploaded", "videoUrl" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[appPreviews]", + "in" : "query", + "description" : "maximum number of related appPreviews returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppPreviewSet", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreviewSetResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "AppPreviewSets" ], + "operationId" : "appPreviewSets-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appPreviews" : { + "post" : { + "tags" : [ "AppPreviews" ], + "operationId" : "appPreviews-create_instance", + "requestBody" : { + "description" : "AppPreview representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreviewCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single AppPreview", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreviewResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/appPreviews/{id}" : { + "get" : { + "tags" : [ "AppPreviews" ], + "operationId" : "appPreviews-get_instance", + "parameters" : [ { + "name" : "fields[appPreviews]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPreviews", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviewSet", "assetDeliveryState", "fileName", "fileSize", "mimeType", "previewFrameTimeCode", "previewImage", "sourceFileChecksum", "uploadOperations", "uploaded", "videoUrl" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviewSet" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppPreview", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreviewResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "AppPreviews" ], + "operationId" : "appPreviews-update_instance", + "requestBody" : { + "description" : "AppPreview representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreviewUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppPreview", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreviewResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "AppPreviews" ], + "operationId" : "appPreviews-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appPricePoints" : { + "get" : { + "tags" : [ "AppPricePoints" ], + "operationId" : "appPricePoints-get_collection", + "parameters" : [ { + "name" : "filter[priceTier]", + "in" : "query", + "description" : "filter by id(s) of related 'priceTier'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[territory]", + "in" : "query", + "description" : "filter by id(s) of related 'territory'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appPricePoints]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPricePoints", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "customerPrice", "priceTier", "proceeds", "territory" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "priceTier", "territory" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[territories]", + "in" : "query", + "description" : "the fields to include for returned resources of type territories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "currency" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of AppPricePoints", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPricePointsResponse" + } + } + } + } + } + } + }, + "/v1/appPricePoints/{id}" : { + "get" : { + "tags" : [ "AppPricePoints" ], + "operationId" : "appPricePoints-get_instance", + "parameters" : [ { + "name" : "fields[appPricePoints]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPricePoints", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "customerPrice", "priceTier", "proceeds", "territory" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "priceTier", "territory" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[territories]", + "in" : "query", + "description" : "the fields to include for returned resources of type territories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "currency" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppPricePoint", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPricePointResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appPriceTiers" : { + "get" : { + "tags" : [ "AppPriceTiers" ], + "operationId" : "appPriceTiers-get_collection", + "parameters" : [ { + "name" : "filter[id]", + "in" : "query", + "description" : "filter by id(s)", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appPriceTiers]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPriceTiers", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "pricePoints" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "pricePoints" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appPricePoints]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPricePoints", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "customerPrice", "priceTier", "proceeds", "territory" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[pricePoints]", + "in" : "query", + "description" : "maximum number of related pricePoints returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of AppPriceTiers", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPriceTiersResponse" + } + } + } + } + } + } + }, + "/v1/appPriceTiers/{id}" : { + "get" : { + "tags" : [ "AppPriceTiers" ], + "operationId" : "appPriceTiers-get_instance", + "parameters" : [ { + "name" : "fields[appPriceTiers]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPriceTiers", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "pricePoints" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "pricePoints" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appPricePoints]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPricePoints", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "customerPrice", "priceTier", "proceeds", "territory" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[pricePoints]", + "in" : "query", + "description" : "maximum number of related pricePoints returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppPriceTier", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPriceTierResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appPrices/{id}" : { + "get" : { + "tags" : [ "AppPrices" ], + "operationId" : "appPrices-get_instance", + "parameters" : [ { + "name" : "fields[appPrices]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPrices", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "priceTier" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "priceTier" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppPrice", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPriceResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appScreenshotSets" : { + "post" : { + "tags" : [ "AppScreenshotSets" ], + "operationId" : "appScreenshotSets-create_instance", + "requestBody" : { + "description" : "AppScreenshotSet representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppScreenshotSetCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single AppScreenshotSet", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppScreenshotSetResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/appScreenshotSets/{id}" : { + "get" : { + "tags" : [ "AppScreenshotSets" ], + "operationId" : "appScreenshotSets-get_instance", + "parameters" : [ { + "name" : "fields[appScreenshotSets]", + "in" : "query", + "description" : "the fields to include for returned resources of type appScreenshotSets", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appScreenshots", "appStoreVersionLocalization", "screenshotDisplayType" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appScreenshots", "appStoreVersionLocalization" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appScreenshots]", + "in" : "query", + "description" : "the fields to include for returned resources of type appScreenshots", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appScreenshotSet", "assetDeliveryState", "assetToken", "assetType", "fileName", "fileSize", "imageAsset", "sourceFileChecksum", "uploadOperations", "uploaded" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[appScreenshots]", + "in" : "query", + "description" : "maximum number of related appScreenshots returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppScreenshotSet", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppScreenshotSetResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "AppScreenshotSets" ], + "operationId" : "appScreenshotSets-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appScreenshots" : { + "post" : { + "tags" : [ "AppScreenshots" ], + "operationId" : "appScreenshots-create_instance", + "requestBody" : { + "description" : "AppScreenshot representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppScreenshotCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single AppScreenshot", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppScreenshotResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/appScreenshots/{id}" : { + "get" : { + "tags" : [ "AppScreenshots" ], + "operationId" : "appScreenshots-get_instance", + "parameters" : [ { + "name" : "fields[appScreenshots]", + "in" : "query", + "description" : "the fields to include for returned resources of type appScreenshots", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appScreenshotSet", "assetDeliveryState", "assetToken", "assetType", "fileName", "fileSize", "imageAsset", "sourceFileChecksum", "uploadOperations", "uploaded" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appScreenshotSet" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppScreenshot", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppScreenshotResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "AppScreenshots" ], + "operationId" : "appScreenshots-update_instance", + "requestBody" : { + "description" : "AppScreenshot representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppScreenshotUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppScreenshot", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppScreenshotResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "AppScreenshots" ], + "operationId" : "appScreenshots-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreReviewAttachments" : { + "post" : { + "tags" : [ "AppStoreReviewAttachments" ], + "operationId" : "appStoreReviewAttachments-create_instance", + "requestBody" : { + "description" : "AppStoreReviewAttachment representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreReviewAttachmentCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single AppStoreReviewAttachment", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreReviewAttachmentResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/appStoreReviewAttachments/{id}" : { + "get" : { + "tags" : [ "AppStoreReviewAttachments" ], + "operationId" : "appStoreReviewAttachments-get_instance", + "parameters" : [ { + "name" : "fields[appStoreReviewAttachments]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreReviewAttachments", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreReviewDetail", "assetDeliveryState", "fileName", "fileSize", "sourceFileChecksum", "uploadOperations", "uploaded" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreReviewDetail" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppStoreReviewAttachment", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreReviewAttachmentResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "AppStoreReviewAttachments" ], + "operationId" : "appStoreReviewAttachments-update_instance", + "requestBody" : { + "description" : "AppStoreReviewAttachment representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreReviewAttachmentUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppStoreReviewAttachment", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreReviewAttachmentResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "AppStoreReviewAttachments" ], + "operationId" : "appStoreReviewAttachments-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreReviewDetails" : { + "post" : { + "tags" : [ "AppStoreReviewDetails" ], + "operationId" : "appStoreReviewDetails-create_instance", + "requestBody" : { + "description" : "AppStoreReviewDetail representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreReviewDetailCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single AppStoreReviewDetail", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreReviewDetailResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/appStoreReviewDetails/{id}" : { + "get" : { + "tags" : [ "AppStoreReviewDetails" ], + "operationId" : "appStoreReviewDetails-get_instance", + "parameters" : [ { + "name" : "fields[appStoreReviewDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreReviewDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreReviewAttachments", "appStoreVersion", "contactEmail", "contactFirstName", "contactLastName", "contactPhone", "demoAccountName", "demoAccountPassword", "demoAccountRequired", "notes" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreReviewAttachments", "appStoreVersion" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appStoreReviewAttachments]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreReviewAttachments", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreReviewDetail", "assetDeliveryState", "fileName", "fileSize", "sourceFileChecksum", "uploadOperations", "uploaded" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[appStoreReviewAttachments]", + "in" : "query", + "description" : "maximum number of related appStoreReviewAttachments returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppStoreReviewDetail", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreReviewDetailResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "AppStoreReviewDetails" ], + "operationId" : "appStoreReviewDetails-update_instance", + "requestBody" : { + "description" : "AppStoreReviewDetail representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreReviewDetailUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppStoreReviewDetail", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreReviewDetailResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersionLocalizations" : { + "post" : { + "tags" : [ "AppStoreVersionLocalizations" ], + "operationId" : "appStoreVersionLocalizations-create_instance", + "requestBody" : { + "description" : "AppStoreVersionLocalization representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionLocalizationCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single AppStoreVersionLocalization", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionLocalizationResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/appStoreVersionLocalizations/{id}" : { + "get" : { + "tags" : [ "AppStoreVersionLocalizations" ], + "operationId" : "appStoreVersionLocalizations-get_instance", + "parameters" : [ { + "name" : "fields[appStoreVersionLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersionLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviewSets", "appScreenshotSets", "appStoreVersion", "description", "keywords", "locale", "marketingUrl", "promotionalText", "supportUrl", "whatsNew" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviewSets", "appScreenshotSets", "appStoreVersion" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appScreenshotSets]", + "in" : "query", + "description" : "the fields to include for returned resources of type appScreenshotSets", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appScreenshots", "appStoreVersionLocalization", "screenshotDisplayType" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appPreviewSets]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPreviewSets", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviews", "appStoreVersionLocalization", "previewType" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[appPreviewSets]", + "in" : "query", + "description" : "maximum number of related appPreviewSets returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[appScreenshotSets]", + "in" : "query", + "description" : "maximum number of related appScreenshotSets returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppStoreVersionLocalization", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionLocalizationResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "AppStoreVersionLocalizations" ], + "operationId" : "appStoreVersionLocalizations-update_instance", + "requestBody" : { + "description" : "AppStoreVersionLocalization representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionLocalizationUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppStoreVersionLocalization", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionLocalizationResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "AppStoreVersionLocalizations" ], + "operationId" : "appStoreVersionLocalizations-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersionPhasedReleases" : { + "post" : { + "tags" : [ "AppStoreVersionPhasedReleases" ], + "operationId" : "appStoreVersionPhasedReleases-create_instance", + "requestBody" : { + "description" : "AppStoreVersionPhasedRelease representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionPhasedReleaseCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single AppStoreVersionPhasedRelease", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionPhasedReleaseResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/appStoreVersionPhasedReleases/{id}" : { + "patch" : { + "tags" : [ "AppStoreVersionPhasedReleases" ], + "operationId" : "appStoreVersionPhasedReleases-update_instance", + "requestBody" : { + "description" : "AppStoreVersionPhasedRelease representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionPhasedReleaseUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppStoreVersionPhasedRelease", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionPhasedReleaseResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "AppStoreVersionPhasedReleases" ], + "operationId" : "appStoreVersionPhasedReleases-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersionSubmissions" : { + "post" : { + "tags" : [ "AppStoreVersionSubmissions" ], + "operationId" : "appStoreVersionSubmissions-create_instance", + "requestBody" : { + "description" : "AppStoreVersionSubmission representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionSubmissionCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single AppStoreVersionSubmission", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionSubmissionResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/appStoreVersionSubmissions/{id}" : { + "delete" : { + "tags" : [ "AppStoreVersionSubmissions" ], + "operationId" : "appStoreVersionSubmissions-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersions" : { + "post" : { + "tags" : [ "AppStoreVersions" ], + "operationId" : "appStoreVersions-create_instance", + "requestBody" : { + "description" : "AppStoreVersion representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single AppStoreVersion", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/appStoreVersions/{id}" : { + "get" : { + "tags" : [ "AppStoreVersions" ], + "operationId" : "appStoreVersions-get_instance", + "parameters" : [ { + "name" : "fields[appStoreVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ageRatingDeclaration", "app", "appStoreReviewDetail", "appStoreState", "appStoreVersionLocalizations", "appStoreVersionPhasedRelease", "appStoreVersionSubmission", "build", "copyright", "createdDate", "downloadable", "earliestReleaseDate", "idfaDeclaration", "platform", "releaseType", "routingAppCoverage", "usesIdfa", "versionString" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ageRatingDeclaration", "app", "appStoreReviewDetail", "appStoreVersionLocalizations", "appStoreVersionPhasedRelease", "appStoreVersionSubmission", "build", "idfaDeclaration", "routingAppCoverage" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appStoreVersionLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersionLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviewSets", "appScreenshotSets", "appStoreVersion", "description", "keywords", "locale", "marketingUrl", "promotionalText", "supportUrl", "whatsNew" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[idfaDeclarations]", + "in" : "query", + "description" : "the fields to include for returned resources of type idfaDeclarations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion", "attributesActionWithPreviousAd", "attributesAppInstallationToPreviousAd", "honorsLimitedAdTracking", "servesAds" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[routingAppCoverages]", + "in" : "query", + "description" : "the fields to include for returned resources of type routingAppCoverages", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion", "assetDeliveryState", "fileName", "fileSize", "sourceFileChecksum", "uploadOperations", "uploaded" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appStoreVersionPhasedReleases]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersionPhasedReleases", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion", "currentDayNumber", "phasedReleaseState", "startDate", "totalPauseDuration" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[ageRatingDeclarations]", + "in" : "query", + "description" : "the fields to include for returned resources of type ageRatingDeclarations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "alcoholTobaccoOrDrugUseOrReferences", "gamblingAndContests", "gamblingSimulated", "horrorOrFearThemes", "kidsAgeBand", "matureOrSuggestiveThemes", "medicalOrTreatmentInformation", "profanityOrCrudeHumor", "sexualContentGraphicAndNudity", "sexualContentOrNudity", "unrestrictedWebAccess", "violenceCartoonOrFantasy", "violenceRealistic", "violenceRealisticProlongedGraphicOrSadistic" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appStoreReviewDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreReviewDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreReviewAttachments", "appStoreVersion", "contactEmail", "contactFirstName", "contactLastName", "contactPhone", "demoAccountName", "demoAccountPassword", "demoAccountRequired", "notes" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appStoreVersionSubmissions]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersionSubmissions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[appStoreVersionLocalizations]", + "in" : "query", + "description" : "maximum number of related appStoreVersionLocalizations returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppStoreVersion", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "AppStoreVersions" ], + "operationId" : "appStoreVersions-update_instance", + "requestBody" : { + "description" : "AppStoreVersion representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single AppStoreVersion", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "AppStoreVersions" ], + "operationId" : "appStoreVersions-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-get_collection", + "parameters" : [ { + "name" : "filter[appStoreVersions.appStoreState]", + "in" : "query", + "description" : "filter by attribute 'appStoreVersions.appStoreState'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "DEVELOPER_REMOVED_FROM_SALE", "DEVELOPER_REJECTED", "IN_REVIEW", "INVALID_BINARY", "METADATA_REJECTED", "PENDING_APPLE_RELEASE", "PENDING_CONTRACT", "PENDING_DEVELOPER_RELEASE", "PREPARE_FOR_SUBMISSION", "PREORDER_READY_FOR_SALE", "PROCESSING_FOR_APP_STORE", "READY_FOR_SALE", "REJECTED", "REMOVED_FROM_SALE", "WAITING_FOR_EXPORT_COMPLIANCE", "WAITING_FOR_REVIEW", "REPLACED_WITH_NEW_VERSION" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[appStoreVersions.platform]", + "in" : "query", + "description" : "filter by attribute 'appStoreVersions.platform'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IOS", "MAC_OS", "TV_OS" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[bundleId]", + "in" : "query", + "description" : "filter by attribute 'bundleId'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[name]", + "in" : "query", + "description" : "filter by attribute 'name'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[sku]", + "in" : "query", + "description" : "filter by attribute 'sku'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[appStoreVersions]", + "in" : "query", + "description" : "filter by id(s) of related 'appStoreVersions'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[id]", + "in" : "query", + "description" : "filter by id(s)", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "exists[gameCenterEnabledVersions]", + "in" : "query", + "description" : "filter by existence or non-existence of related 'gameCenterEnabledVersions'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "sort", + "in" : "query", + "description" : "comma-separated list of sort expressions; resources will be sorted as specified", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "bundleId", "-bundleId", "name", "-name", "sku", "-sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "builds", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "preOrder", "preReleaseVersions", "prices" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaGroups]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaGroups", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "betaTesters", "builds", "createdDate", "feedbackEnabled", "isInternalGroup", "name", "publicLink", "publicLinkEnabled", "publicLinkId", "publicLinkLimit", "publicLinkLimitEnabled" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[perfPowerMetrics]", + "in" : "query", + "description" : "the fields to include for returned resources of type perfPowerMetrics", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "deviceType", "metricType", "platform" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appInfos]", + "in" : "query", + "description" : "the fields to include for returned resources of type appInfos", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appInfoLocalizations", "appStoreAgeRating", "appStoreState", "brazilAgeRating", "kidsAgeBand", "primaryCategory", "primarySubcategoryOne", "primarySubcategoryTwo", "secondaryCategory", "secondarySubcategoryOne", "secondarySubcategoryTwo" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appPreOrders]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPreOrders", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appReleaseDate", "preOrderAvailableDate" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[preReleaseVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type preReleaseVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "builds", "platform", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appPrices]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPrices", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "priceTier" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[inAppPurchases]", + "in" : "query", + "description" : "the fields to include for returned resources of type inAppPurchases", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps", "inAppPurchaseType", "productId", "referenceName", "state" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaAppReviewDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppReviewDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "contactEmail", "contactFirstName", "contactLastName", "contactPhone", "demoAccountName", "demoAccountPassword", "demoAccountRequired", "notes" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[territories]", + "in" : "query", + "description" : "the fields to include for returned resources of type territories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "currency" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[gameCenterEnabledVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type gameCenterEnabledVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "compatibleVersions", "iconAsset", "platform", "versionString" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appStoreVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ageRatingDeclaration", "app", "appStoreReviewDetail", "appStoreState", "appStoreVersionLocalizations", "appStoreVersionPhasedRelease", "appStoreVersionSubmission", "build", "copyright", "createdDate", "downloadable", "earliestReleaseDate", "idfaDeclaration", "platform", "releaseType", "routingAppCoverage", "usesIdfa", "versionString" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaAppLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "description", "feedbackEmail", "locale", "marketingUrl", "privacyPolicyUrl", "tvOsPrivacyPolicy" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaLicenseAgreements]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaLicenseAgreements", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "agreementText", "app" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[endUserLicenseAgreements]", + "in" : "query", + "description" : "the fields to include for returned resources of type endUserLicenseAgreements", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "agreementText", "app", "territories" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[appInfos]", + "in" : "query", + "description" : "maximum number of related appInfos returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[appStoreVersions]", + "in" : "query", + "description" : "maximum number of related appStoreVersions returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[availableTerritories]", + "in" : "query", + "description" : "maximum number of related availableTerritories returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[betaAppLocalizations]", + "in" : "query", + "description" : "maximum number of related betaAppLocalizations returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[betaGroups]", + "in" : "query", + "description" : "maximum number of related betaGroups returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[builds]", + "in" : "query", + "description" : "maximum number of related builds returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[gameCenterEnabledVersions]", + "in" : "query", + "description" : "maximum number of related gameCenterEnabledVersions returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[inAppPurchases]", + "in" : "query", + "description" : "maximum number of related inAppPurchases returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[preReleaseVersions]", + "in" : "query", + "description" : "maximum number of related preReleaseVersions returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[prices]", + "in" : "query", + "description" : "maximum number of related prices returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of Apps", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppsResponse" + } + } + } + } + } + } + }, + "/v1/apps/{id}" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-get_instance", + "parameters" : [ { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "builds", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "preOrder", "preReleaseVersions", "prices" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaGroups]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaGroups", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "betaTesters", "builds", "createdDate", "feedbackEnabled", "isInternalGroup", "name", "publicLink", "publicLinkEnabled", "publicLinkId", "publicLinkLimit", "publicLinkLimitEnabled" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[perfPowerMetrics]", + "in" : "query", + "description" : "the fields to include for returned resources of type perfPowerMetrics", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "deviceType", "metricType", "platform" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appInfos]", + "in" : "query", + "description" : "the fields to include for returned resources of type appInfos", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appInfoLocalizations", "appStoreAgeRating", "appStoreState", "brazilAgeRating", "kidsAgeBand", "primaryCategory", "primarySubcategoryOne", "primarySubcategoryTwo", "secondaryCategory", "secondarySubcategoryOne", "secondarySubcategoryTwo" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appPreOrders]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPreOrders", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appReleaseDate", "preOrderAvailableDate" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[preReleaseVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type preReleaseVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "builds", "platform", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appPrices]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPrices", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "priceTier" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[inAppPurchases]", + "in" : "query", + "description" : "the fields to include for returned resources of type inAppPurchases", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps", "inAppPurchaseType", "productId", "referenceName", "state" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaAppReviewDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppReviewDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "contactEmail", "contactFirstName", "contactLastName", "contactPhone", "demoAccountName", "demoAccountPassword", "demoAccountRequired", "notes" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[territories]", + "in" : "query", + "description" : "the fields to include for returned resources of type territories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "currency" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[gameCenterEnabledVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type gameCenterEnabledVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "compatibleVersions", "iconAsset", "platform", "versionString" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appStoreVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ageRatingDeclaration", "app", "appStoreReviewDetail", "appStoreState", "appStoreVersionLocalizations", "appStoreVersionPhasedRelease", "appStoreVersionSubmission", "build", "copyright", "createdDate", "downloadable", "earliestReleaseDate", "idfaDeclaration", "platform", "releaseType", "routingAppCoverage", "usesIdfa", "versionString" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaAppLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "description", "feedbackEmail", "locale", "marketingUrl", "privacyPolicyUrl", "tvOsPrivacyPolicy" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaLicenseAgreements]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaLicenseAgreements", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "agreementText", "app" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[endUserLicenseAgreements]", + "in" : "query", + "description" : "the fields to include for returned resources of type endUserLicenseAgreements", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "agreementText", "app", "territories" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[appInfos]", + "in" : "query", + "description" : "maximum number of related appInfos returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[appStoreVersions]", + "in" : "query", + "description" : "maximum number of related appStoreVersions returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[availableTerritories]", + "in" : "query", + "description" : "maximum number of related availableTerritories returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[betaAppLocalizations]", + "in" : "query", + "description" : "maximum number of related betaAppLocalizations returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[betaGroups]", + "in" : "query", + "description" : "maximum number of related betaGroups returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[builds]", + "in" : "query", + "description" : "maximum number of related builds returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[gameCenterEnabledVersions]", + "in" : "query", + "description" : "maximum number of related gameCenterEnabledVersions returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[inAppPurchases]", + "in" : "query", + "description" : "maximum number of related inAppPurchases returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[preReleaseVersions]", + "in" : "query", + "description" : "maximum number of related preReleaseVersions returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[prices]", + "in" : "query", + "description" : "maximum number of related prices returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single App", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "Apps" ], + "operationId" : "apps-update_instance", + "requestBody" : { + "description" : "App representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single App", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaAppLocalizations" : { + "get" : { + "tags" : [ "BetaAppLocalizations" ], + "operationId" : "betaAppLocalizations-get_collection", + "parameters" : [ { + "name" : "filter[locale]", + "in" : "query", + "description" : "filter by attribute 'locale'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[app]", + "in" : "query", + "description" : "filter by id(s) of related 'app'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaAppLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "description", "feedbackEmail", "locale", "marketingUrl", "privacyPolicyUrl", "tvOsPrivacyPolicy" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of BetaAppLocalizations", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppLocalizationsResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "BetaAppLocalizations" ], + "operationId" : "betaAppLocalizations-create_instance", + "requestBody" : { + "description" : "BetaAppLocalization representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppLocalizationCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single BetaAppLocalization", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppLocalizationResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/betaAppLocalizations/{id}" : { + "get" : { + "tags" : [ "BetaAppLocalizations" ], + "operationId" : "betaAppLocalizations-get_instance", + "parameters" : [ { + "name" : "fields[betaAppLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "description", "feedbackEmail", "locale", "marketingUrl", "privacyPolicyUrl", "tvOsPrivacyPolicy" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BetaAppLocalization", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppLocalizationResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "BetaAppLocalizations" ], + "operationId" : "betaAppLocalizations-update_instance", + "requestBody" : { + "description" : "BetaAppLocalization representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppLocalizationUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BetaAppLocalization", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppLocalizationResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "BetaAppLocalizations" ], + "operationId" : "betaAppLocalizations-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaAppReviewDetails" : { + "get" : { + "tags" : [ "BetaAppReviewDetails" ], + "operationId" : "betaAppReviewDetails-get_collection", + "parameters" : [ { + "name" : "filter[app]", + "in" : "query", + "description" : "filter by id(s) of related 'app'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : true + }, { + "name" : "fields[betaAppReviewDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppReviewDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "contactEmail", "contactFirstName", "contactLastName", "contactPhone", "demoAccountName", "demoAccountPassword", "demoAccountRequired", "notes" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of BetaAppReviewDetails", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppReviewDetailsResponse" + } + } + } + } + } + } + }, + "/v1/betaAppReviewDetails/{id}" : { + "get" : { + "tags" : [ "BetaAppReviewDetails" ], + "operationId" : "betaAppReviewDetails-get_instance", + "parameters" : [ { + "name" : "fields[betaAppReviewDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppReviewDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "contactEmail", "contactFirstName", "contactLastName", "contactPhone", "demoAccountName", "demoAccountPassword", "demoAccountRequired", "notes" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BetaAppReviewDetail", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppReviewDetailResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "BetaAppReviewDetails" ], + "operationId" : "betaAppReviewDetails-update_instance", + "requestBody" : { + "description" : "BetaAppReviewDetail representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppReviewDetailUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BetaAppReviewDetail", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppReviewDetailResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaAppReviewSubmissions" : { + "get" : { + "tags" : [ "BetaAppReviewSubmissions" ], + "operationId" : "betaAppReviewSubmissions-get_collection", + "parameters" : [ { + "name" : "filter[betaReviewState]", + "in" : "query", + "description" : "filter by attribute 'betaReviewState'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "WAITING_FOR_REVIEW", "IN_REVIEW", "REJECTED", "APPROVED" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[build]", + "in" : "query", + "description" : "filter by id(s) of related 'build'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : true + }, { + "name" : "fields[betaAppReviewSubmissions]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppReviewSubmissions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "betaReviewState", "build" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "build" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of BetaAppReviewSubmissions", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppReviewSubmissionsResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "BetaAppReviewSubmissions" ], + "operationId" : "betaAppReviewSubmissions-create_instance", + "requestBody" : { + "description" : "BetaAppReviewSubmission representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppReviewSubmissionCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single BetaAppReviewSubmission", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppReviewSubmissionResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/betaAppReviewSubmissions/{id}" : { + "get" : { + "tags" : [ "BetaAppReviewSubmissions" ], + "operationId" : "betaAppReviewSubmissions-get_instance", + "parameters" : [ { + "name" : "fields[betaAppReviewSubmissions]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppReviewSubmissions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "betaReviewState", "build" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "build" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BetaAppReviewSubmission", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppReviewSubmissionResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaBuildLocalizations" : { + "get" : { + "tags" : [ "BetaBuildLocalizations" ], + "operationId" : "betaBuildLocalizations-get_collection", + "parameters" : [ { + "name" : "filter[locale]", + "in" : "query", + "description" : "filter by attribute 'locale'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[build]", + "in" : "query", + "description" : "filter by id(s) of related 'build'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaBuildLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaBuildLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "build", "locale", "whatsNew" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "build" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of BetaBuildLocalizations", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaBuildLocalizationsResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "BetaBuildLocalizations" ], + "operationId" : "betaBuildLocalizations-create_instance", + "requestBody" : { + "description" : "BetaBuildLocalization representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaBuildLocalizationCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single BetaBuildLocalization", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaBuildLocalizationResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/betaBuildLocalizations/{id}" : { + "get" : { + "tags" : [ "BetaBuildLocalizations" ], + "operationId" : "betaBuildLocalizations-get_instance", + "parameters" : [ { + "name" : "fields[betaBuildLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaBuildLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "build", "locale", "whatsNew" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "build" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BetaBuildLocalization", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaBuildLocalizationResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "BetaBuildLocalizations" ], + "operationId" : "betaBuildLocalizations-update_instance", + "requestBody" : { + "description" : "BetaBuildLocalization representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaBuildLocalizationUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BetaBuildLocalization", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaBuildLocalizationResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "BetaBuildLocalizations" ], + "operationId" : "betaBuildLocalizations-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaGroups" : { + "get" : { + "tags" : [ "BetaGroups" ], + "operationId" : "betaGroups-get_collection", + "parameters" : [ { + "name" : "filter[isInternalGroup]", + "in" : "query", + "description" : "filter by attribute 'isInternalGroup'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[name]", + "in" : "query", + "description" : "filter by attribute 'name'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[publicLink]", + "in" : "query", + "description" : "filter by attribute 'publicLink'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[publicLinkEnabled]", + "in" : "query", + "description" : "filter by attribute 'publicLinkEnabled'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[publicLinkLimitEnabled]", + "in" : "query", + "description" : "filter by attribute 'publicLinkLimitEnabled'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[app]", + "in" : "query", + "description" : "filter by id(s) of related 'app'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[builds]", + "in" : "query", + "description" : "filter by id(s) of related 'builds'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[id]", + "in" : "query", + "description" : "filter by id(s)", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "sort", + "in" : "query", + "description" : "comma-separated list of sort expressions; resources will be sorted as specified", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "createdDate", "-createdDate", "name", "-name", "publicLinkEnabled", "-publicLinkEnabled", "publicLinkLimit", "-publicLinkLimit" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaGroups]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaGroups", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "betaTesters", "builds", "createdDate", "feedbackEnabled", "isInternalGroup", "name", "publicLink", "publicLinkEnabled", "publicLinkId", "publicLinkLimit", "publicLinkLimitEnabled" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "betaTesters", "builds" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaTesters]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaTesters", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps", "betaGroups", "builds", "email", "firstName", "inviteType", "lastName" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[betaTesters]", + "in" : "query", + "description" : "maximum number of related betaTesters returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[builds]", + "in" : "query", + "description" : "maximum number of related builds returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 1000 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of BetaGroups", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaGroupsResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "BetaGroups" ], + "operationId" : "betaGroups-create_instance", + "requestBody" : { + "description" : "BetaGroup representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaGroupCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single BetaGroup", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaGroupResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/betaGroups/{id}" : { + "get" : { + "tags" : [ "BetaGroups" ], + "operationId" : "betaGroups-get_instance", + "parameters" : [ { + "name" : "fields[betaGroups]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaGroups", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "betaTesters", "builds", "createdDate", "feedbackEnabled", "isInternalGroup", "name", "publicLink", "publicLinkEnabled", "publicLinkId", "publicLinkLimit", "publicLinkLimitEnabled" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "betaTesters", "builds" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaTesters]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaTesters", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps", "betaGroups", "builds", "email", "firstName", "inviteType", "lastName" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[betaTesters]", + "in" : "query", + "description" : "maximum number of related betaTesters returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[builds]", + "in" : "query", + "description" : "maximum number of related builds returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 1000 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BetaGroup", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaGroupResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "BetaGroups" ], + "operationId" : "betaGroups-update_instance", + "requestBody" : { + "description" : "BetaGroup representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaGroupUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BetaGroup", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaGroupResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "BetaGroups" ], + "operationId" : "betaGroups-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaLicenseAgreements" : { + "get" : { + "tags" : [ "BetaLicenseAgreements" ], + "operationId" : "betaLicenseAgreements-get_collection", + "parameters" : [ { + "name" : "filter[app]", + "in" : "query", + "description" : "filter by id(s) of related 'app'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaLicenseAgreements]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaLicenseAgreements", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "agreementText", "app" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of BetaLicenseAgreements", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaLicenseAgreementsResponse" + } + } + } + } + } + } + }, + "/v1/betaLicenseAgreements/{id}" : { + "get" : { + "tags" : [ "BetaLicenseAgreements" ], + "operationId" : "betaLicenseAgreements-get_instance", + "parameters" : [ { + "name" : "fields[betaLicenseAgreements]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaLicenseAgreements", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "agreementText", "app" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BetaLicenseAgreement", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaLicenseAgreementResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "BetaLicenseAgreements" ], + "operationId" : "betaLicenseAgreements-update_instance", + "requestBody" : { + "description" : "BetaLicenseAgreement representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaLicenseAgreementUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BetaLicenseAgreement", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaLicenseAgreementResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaTesterInvitations" : { + "post" : { + "tags" : [ "BetaTesterInvitations" ], + "operationId" : "betaTesterInvitations-create_instance", + "requestBody" : { + "description" : "BetaTesterInvitation representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTesterInvitationCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single BetaTesterInvitation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTesterInvitationResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/betaTesters" : { + "get" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-get_collection", + "parameters" : [ { + "name" : "filter[email]", + "in" : "query", + "description" : "filter by attribute 'email'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[firstName]", + "in" : "query", + "description" : "filter by attribute 'firstName'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[inviteType]", + "in" : "query", + "description" : "filter by attribute 'inviteType'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "EMAIL", "PUBLIC_LINK" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[lastName]", + "in" : "query", + "description" : "filter by attribute 'lastName'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[apps]", + "in" : "query", + "description" : "filter by id(s) of related 'apps'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[betaGroups]", + "in" : "query", + "description" : "filter by id(s) of related 'betaGroups'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[builds]", + "in" : "query", + "description" : "filter by id(s) of related 'builds'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "sort", + "in" : "query", + "description" : "comma-separated list of sort expressions; resources will be sorted as specified", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "email", "-email", "firstName", "-firstName", "inviteType", "-inviteType", "lastName", "-lastName" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaTesters]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaTesters", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps", "betaGroups", "builds", "email", "firstName", "inviteType", "lastName" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps", "betaGroups", "builds" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaGroups]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaGroups", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "betaTesters", "builds", "createdDate", "feedbackEnabled", "isInternalGroup", "name", "publicLink", "publicLinkEnabled", "publicLinkId", "publicLinkLimit", "publicLinkLimitEnabled" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[apps]", + "in" : "query", + "description" : "maximum number of related apps returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[betaGroups]", + "in" : "query", + "description" : "maximum number of related betaGroups returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[builds]", + "in" : "query", + "description" : "maximum number of related builds returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of BetaTesters", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTestersResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-create_instance", + "requestBody" : { + "description" : "BetaTester representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTesterCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single BetaTester", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTesterResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/betaTesters/{id}" : { + "get" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-get_instance", + "parameters" : [ { + "name" : "fields[betaTesters]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaTesters", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps", "betaGroups", "builds", "email", "firstName", "inviteType", "lastName" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps", "betaGroups", "builds" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaGroups]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaGroups", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "betaTesters", "builds", "createdDate", "feedbackEnabled", "isInternalGroup", "name", "publicLink", "publicLinkEnabled", "publicLinkId", "publicLinkLimit", "publicLinkLimitEnabled" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[apps]", + "in" : "query", + "description" : "maximum number of related apps returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[betaGroups]", + "in" : "query", + "description" : "maximum number of related betaGroups returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[builds]", + "in" : "query", + "description" : "maximum number of related builds returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BetaTester", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTesterResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/buildBetaDetails" : { + "get" : { + "tags" : [ "BuildBetaDetails" ], + "operationId" : "buildBetaDetails-get_collection", + "parameters" : [ { + "name" : "filter[build]", + "in" : "query", + "description" : "filter by id(s) of related 'build'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[id]", + "in" : "query", + "description" : "filter by id(s)", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[buildBetaDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type buildBetaDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "autoNotifyEnabled", "build", "externalBuildState", "internalBuildState" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "build" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of BuildBetaDetails", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildBetaDetailsResponse" + } + } + } + } + } + } + }, + "/v1/buildBetaDetails/{id}" : { + "get" : { + "tags" : [ "BuildBetaDetails" ], + "operationId" : "buildBetaDetails-get_instance", + "parameters" : [ { + "name" : "fields[buildBetaDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type buildBetaDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "autoNotifyEnabled", "build", "externalBuildState", "internalBuildState" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "build" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BuildBetaDetail", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildBetaDetailResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "BuildBetaDetails" ], + "operationId" : "buildBetaDetails-update_instance", + "requestBody" : { + "description" : "BuildBetaDetail representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildBetaDetailUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BuildBetaDetail", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildBetaDetailResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/buildBetaNotifications" : { + "post" : { + "tags" : [ "BuildBetaNotifications" ], + "operationId" : "buildBetaNotifications-create_instance", + "requestBody" : { + "description" : "BuildBetaNotification representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildBetaNotificationCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single BuildBetaNotification", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildBetaNotificationResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/builds" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-get_collection", + "parameters" : [ { + "name" : "filter[betaAppReviewSubmission.betaReviewState]", + "in" : "query", + "description" : "filter by attribute 'betaAppReviewSubmission.betaReviewState'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "WAITING_FOR_REVIEW", "IN_REVIEW", "REJECTED", "APPROVED" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[expired]", + "in" : "query", + "description" : "filter by attribute 'expired'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[preReleaseVersion.platform]", + "in" : "query", + "description" : "filter by attribute 'preReleaseVersion.platform'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IOS", "MAC_OS", "TV_OS" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[preReleaseVersion.version]", + "in" : "query", + "description" : "filter by attribute 'preReleaseVersion.version'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[processingState]", + "in" : "query", + "description" : "filter by attribute 'processingState'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "PROCESSING", "FAILED", "INVALID", "VALID" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[usesNonExemptEncryption]", + "in" : "query", + "description" : "filter by attribute 'usesNonExemptEncryption'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[version]", + "in" : "query", + "description" : "filter by attribute 'version'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[app]", + "in" : "query", + "description" : "filter by id(s) of related 'app'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[appStoreVersion]", + "in" : "query", + "description" : "filter by id(s) of related 'appStoreVersion'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[betaGroups]", + "in" : "query", + "description" : "filter by id(s) of related 'betaGroups'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[preReleaseVersion]", + "in" : "query", + "description" : "filter by id(s) of related 'preReleaseVersion'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[id]", + "in" : "query", + "description" : "filter by id(s)", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "sort", + "in" : "query", + "description" : "comma-separated list of sort expressions; resources will be sorted as specified", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "preReleaseVersion", "-preReleaseVersion", "uploadedDate", "-uploadedDate", "version", "-version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "buildBetaDetail", "icons", "individualTesters", "preReleaseVersion" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appEncryptionDeclarations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appEncryptionDeclarations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclarationState", "availableOnFrenchStore", "builds", "codeValue", "containsProprietaryCryptography", "containsThirdPartyCryptography", "documentName", "documentType", "documentUrl", "exempt", "platform", "uploadedDate", "usesEncryption" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaAppReviewSubmissions]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppReviewSubmissions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "betaReviewState", "build" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[buildBetaDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type buildBetaDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "autoNotifyEnabled", "build", "externalBuildState", "internalBuildState" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[buildIcons]", + "in" : "query", + "description" : "the fields to include for returned resources of type buildIcons", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "iconAsset", "iconType" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[perfPowerMetrics]", + "in" : "query", + "description" : "the fields to include for returned resources of type perfPowerMetrics", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "deviceType", "metricType", "platform" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[preReleaseVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type preReleaseVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "builds", "platform", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appStoreVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ageRatingDeclaration", "app", "appStoreReviewDetail", "appStoreState", "appStoreVersionLocalizations", "appStoreVersionPhasedRelease", "appStoreVersionSubmission", "build", "copyright", "createdDate", "downloadable", "earliestReleaseDate", "idfaDeclaration", "platform", "releaseType", "routingAppCoverage", "usesIdfa", "versionString" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[diagnosticSignatures]", + "in" : "query", + "description" : "the fields to include for returned resources of type diagnosticSignatures", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "diagnosticType", "logs", "signature", "weight" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaTesters]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaTesters", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps", "betaGroups", "builds", "email", "firstName", "inviteType", "lastName" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaBuildLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaBuildLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "build", "locale", "whatsNew" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[betaBuildLocalizations]", + "in" : "query", + "description" : "maximum number of related betaBuildLocalizations returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[icons]", + "in" : "query", + "description" : "maximum number of related icons returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[individualTesters]", + "in" : "query", + "description" : "maximum number of related individualTesters returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of Builds", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildsResponse" + } + } + } + } + } + } + }, + "/v1/builds/{id}" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-get_instance", + "parameters" : [ { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "buildBetaDetail", "icons", "individualTesters", "preReleaseVersion" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appEncryptionDeclarations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appEncryptionDeclarations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclarationState", "availableOnFrenchStore", "builds", "codeValue", "containsProprietaryCryptography", "containsThirdPartyCryptography", "documentName", "documentType", "documentUrl", "exempt", "platform", "uploadedDate", "usesEncryption" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaAppReviewSubmissions]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppReviewSubmissions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "betaReviewState", "build" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[buildBetaDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type buildBetaDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "autoNotifyEnabled", "build", "externalBuildState", "internalBuildState" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[buildIcons]", + "in" : "query", + "description" : "the fields to include for returned resources of type buildIcons", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "iconAsset", "iconType" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[perfPowerMetrics]", + "in" : "query", + "description" : "the fields to include for returned resources of type perfPowerMetrics", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "deviceType", "metricType", "platform" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[preReleaseVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type preReleaseVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "builds", "platform", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[appStoreVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ageRatingDeclaration", "app", "appStoreReviewDetail", "appStoreState", "appStoreVersionLocalizations", "appStoreVersionPhasedRelease", "appStoreVersionSubmission", "build", "copyright", "createdDate", "downloadable", "earliestReleaseDate", "idfaDeclaration", "platform", "releaseType", "routingAppCoverage", "usesIdfa", "versionString" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[diagnosticSignatures]", + "in" : "query", + "description" : "the fields to include for returned resources of type diagnosticSignatures", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "diagnosticType", "logs", "signature", "weight" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaTesters]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaTesters", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps", "betaGroups", "builds", "email", "firstName", "inviteType", "lastName" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[betaBuildLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaBuildLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "build", "locale", "whatsNew" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[betaBuildLocalizations]", + "in" : "query", + "description" : "maximum number of related betaBuildLocalizations returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[icons]", + "in" : "query", + "description" : "maximum number of related icons returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[individualTesters]", + "in" : "query", + "description" : "maximum number of related individualTesters returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single Build", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "Builds" ], + "operationId" : "builds-update_instance", + "requestBody" : { + "description" : "Build representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single Build", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/bundleIdCapabilities" : { + "post" : { + "tags" : [ "BundleIdCapabilities" ], + "operationId" : "bundleIdCapabilities-create_instance", + "requestBody" : { + "description" : "BundleIdCapability representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleIdCapabilityCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single BundleIdCapability", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleIdCapabilityResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/bundleIdCapabilities/{id}" : { + "patch" : { + "tags" : [ "BundleIdCapabilities" ], + "operationId" : "bundleIdCapabilities-update_instance", + "requestBody" : { + "description" : "BundleIdCapability representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleIdCapabilityUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BundleIdCapability", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleIdCapabilityResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "BundleIdCapabilities" ], + "operationId" : "bundleIdCapabilities-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/bundleIds" : { + "get" : { + "tags" : [ "BundleIds" ], + "operationId" : "bundleIds-get_collection", + "parameters" : [ { + "name" : "filter[identifier]", + "in" : "query", + "description" : "filter by attribute 'identifier'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[name]", + "in" : "query", + "description" : "filter by attribute 'name'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[platform]", + "in" : "query", + "description" : "filter by attribute 'platform'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IOS", "MAC_OS" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[seedId]", + "in" : "query", + "description" : "filter by attribute 'seedId'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[id]", + "in" : "query", + "description" : "filter by id(s)", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "sort", + "in" : "query", + "description" : "comma-separated list of sort expressions; resources will be sorted as specified", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "id", "-id", "identifier", "-identifier", "name", "-name", "platform", "-platform", "seedId", "-seedId" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[bundleIds]", + "in" : "query", + "description" : "the fields to include for returned resources of type bundleIds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "bundleIdCapabilities", "identifier", "name", "platform", "profiles", "seedId" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "bundleIdCapabilities", "profiles" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[bundleIdCapabilities]", + "in" : "query", + "description" : "the fields to include for returned resources of type bundleIdCapabilities", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "bundleId", "capabilityType", "settings" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[profiles]", + "in" : "query", + "description" : "the fields to include for returned resources of type profiles", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "bundleId", "certificates", "createdDate", "devices", "expirationDate", "name", "platform", "profileContent", "profileState", "profileType", "uuid" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[bundleIdCapabilities]", + "in" : "query", + "description" : "maximum number of related bundleIdCapabilities returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[profiles]", + "in" : "query", + "description" : "maximum number of related profiles returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of BundleIds", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleIdsResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "BundleIds" ], + "operationId" : "bundleIds-create_instance", + "requestBody" : { + "description" : "BundleId representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleIdCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single BundleId", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleIdResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/bundleIds/{id}" : { + "get" : { + "tags" : [ "BundleIds" ], + "operationId" : "bundleIds-get_instance", + "parameters" : [ { + "name" : "fields[bundleIds]", + "in" : "query", + "description" : "the fields to include for returned resources of type bundleIds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "bundleIdCapabilities", "identifier", "name", "platform", "profiles", "seedId" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "bundleIdCapabilities", "profiles" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[bundleIdCapabilities]", + "in" : "query", + "description" : "the fields to include for returned resources of type bundleIdCapabilities", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "bundleId", "capabilityType", "settings" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[profiles]", + "in" : "query", + "description" : "the fields to include for returned resources of type profiles", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "bundleId", "certificates", "createdDate", "devices", "expirationDate", "name", "platform", "profileContent", "profileState", "profileType", "uuid" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[bundleIdCapabilities]", + "in" : "query", + "description" : "maximum number of related bundleIdCapabilities returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[profiles]", + "in" : "query", + "description" : "maximum number of related profiles returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BundleId", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleIdResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "BundleIds" ], + "operationId" : "bundleIds-update_instance", + "requestBody" : { + "description" : "BundleId representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleIdUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single BundleId", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleIdResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "BundleIds" ], + "operationId" : "bundleIds-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/certificates" : { + "get" : { + "tags" : [ "Certificates" ], + "operationId" : "certificates-get_collection", + "parameters" : [ { + "name" : "filter[certificateType]", + "in" : "query", + "description" : "filter by attribute 'certificateType'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IOS_DEVELOPMENT", "IOS_DISTRIBUTION", "MAC_APP_DISTRIBUTION", "MAC_INSTALLER_DISTRIBUTION", "MAC_APP_DEVELOPMENT", "DEVELOPER_ID_KEXT", "DEVELOPER_ID_APPLICATION", "DEVELOPMENT", "DISTRIBUTION" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[displayName]", + "in" : "query", + "description" : "filter by attribute 'displayName'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[serialNumber]", + "in" : "query", + "description" : "filter by attribute 'serialNumber'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[id]", + "in" : "query", + "description" : "filter by id(s)", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "sort", + "in" : "query", + "description" : "comma-separated list of sort expressions; resources will be sorted as specified", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "certificateType", "-certificateType", "displayName", "-displayName", "id", "-id", "serialNumber", "-serialNumber" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[certificates]", + "in" : "query", + "description" : "the fields to include for returned resources of type certificates", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "certificateContent", "certificateType", "csrContent", "displayName", "expirationDate", "name", "platform", "serialNumber" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of Certificates", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CertificatesResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "Certificates" ], + "operationId" : "certificates-create_instance", + "requestBody" : { + "description" : "Certificate representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CertificateCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single Certificate", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CertificateResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/certificates/{id}" : { + "get" : { + "tags" : [ "Certificates" ], + "operationId" : "certificates-get_instance", + "parameters" : [ { + "name" : "fields[certificates]", + "in" : "query", + "description" : "the fields to include for returned resources of type certificates", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "certificateContent", "certificateType", "csrContent", "displayName", "expirationDate", "name", "platform", "serialNumber" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single Certificate", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CertificateResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "Certificates" ], + "operationId" : "certificates-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/devices" : { + "get" : { + "tags" : [ "Devices" ], + "operationId" : "devices-get_collection", + "parameters" : [ { + "name" : "filter[name]", + "in" : "query", + "description" : "filter by attribute 'name'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[platform]", + "in" : "query", + "description" : "filter by attribute 'platform'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IOS", "MAC_OS" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[status]", + "in" : "query", + "description" : "filter by attribute 'status'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ENABLED", "DISABLED" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[udid]", + "in" : "query", + "description" : "filter by attribute 'udid'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[id]", + "in" : "query", + "description" : "filter by id(s)", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "sort", + "in" : "query", + "description" : "comma-separated list of sort expressions; resources will be sorted as specified", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "id", "-id", "name", "-name", "platform", "-platform", "status", "-status", "udid", "-udid" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[devices]", + "in" : "query", + "description" : "the fields to include for returned resources of type devices", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "addedDate", "deviceClass", "model", "name", "platform", "status", "udid" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of Devices", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DevicesResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "Devices" ], + "operationId" : "devices-create_instance", + "requestBody" : { + "description" : "Device representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeviceCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single Device", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeviceResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/devices/{id}" : { + "get" : { + "tags" : [ "Devices" ], + "operationId" : "devices-get_instance", + "parameters" : [ { + "name" : "fields[devices]", + "in" : "query", + "description" : "the fields to include for returned resources of type devices", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "addedDate", "deviceClass", "model", "name", "platform", "status", "udid" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single Device", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeviceResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "Devices" ], + "operationId" : "devices-update_instance", + "requestBody" : { + "description" : "Device representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeviceUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single Device", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeviceResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/endUserLicenseAgreements" : { + "post" : { + "tags" : [ "EndUserLicenseAgreements" ], + "operationId" : "endUserLicenseAgreements-create_instance", + "requestBody" : { + "description" : "EndUserLicenseAgreement representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EndUserLicenseAgreementCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single EndUserLicenseAgreement", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EndUserLicenseAgreementResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/endUserLicenseAgreements/{id}" : { + "get" : { + "tags" : [ "EndUserLicenseAgreements" ], + "operationId" : "endUserLicenseAgreements-get_instance", + "parameters" : [ { + "name" : "fields[endUserLicenseAgreements]", + "in" : "query", + "description" : "the fields to include for returned resources of type endUserLicenseAgreements", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "agreementText", "app", "territories" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "territories" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[territories]", + "in" : "query", + "description" : "the fields to include for returned resources of type territories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "currency" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[territories]", + "in" : "query", + "description" : "maximum number of related territories returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single EndUserLicenseAgreement", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EndUserLicenseAgreementResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "EndUserLicenseAgreements" ], + "operationId" : "endUserLicenseAgreements-update_instance", + "requestBody" : { + "description" : "EndUserLicenseAgreement representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EndUserLicenseAgreementUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single EndUserLicenseAgreement", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EndUserLicenseAgreementResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "EndUserLicenseAgreements" ], + "operationId" : "endUserLicenseAgreements-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/financeReports" : { + "get" : { + "tags" : [ "FinanceReports" ], + "operationId" : "financeReports-get_collection", + "parameters" : [ { + "name" : "filter[regionCode]", + "in" : "query", + "description" : "filter by attribute 'regionCode'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : true + }, { + "name" : "filter[reportDate]", + "in" : "query", + "description" : "filter by attribute 'reportDate'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : true + }, { + "name" : "filter[reportType]", + "in" : "query", + "description" : "filter by attribute 'reportType'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "FINANCIAL", "FINANCE_DETAIL" ] + } + }, + "style" : "form", + "explode" : false, + "required" : true + }, { + "name" : "filter[vendorNumber]", + "in" : "query", + "description" : "filter by attribute 'vendorNumber'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : true + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of FinanceReports", + "content" : { + "gzip" : { + "schema" : { + "type" : "string", + "format" : "binary" + } + } + } + } + } + } + }, + "/v1/idfaDeclarations" : { + "post" : { + "tags" : [ "IdfaDeclarations" ], + "operationId" : "idfaDeclarations-create_instance", + "requestBody" : { + "description" : "IdfaDeclaration representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/IdfaDeclarationCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single IdfaDeclaration", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/IdfaDeclarationResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/idfaDeclarations/{id}" : { + "patch" : { + "tags" : [ "IdfaDeclarations" ], + "operationId" : "idfaDeclarations-update_instance", + "requestBody" : { + "description" : "IdfaDeclaration representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/IdfaDeclarationUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single IdfaDeclaration", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/IdfaDeclarationResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "IdfaDeclarations" ], + "operationId" : "idfaDeclarations-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/inAppPurchases/{id}" : { + "get" : { + "tags" : [ "InAppPurchases" ], + "operationId" : "inAppPurchases-get_instance", + "parameters" : [ { + "name" : "fields[inAppPurchases]", + "in" : "query", + "description" : "the fields to include for returned resources of type inAppPurchases", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps", "inAppPurchaseType", "productId", "referenceName", "state" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[apps]", + "in" : "query", + "description" : "maximum number of related apps returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single InAppPurchase", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/InAppPurchaseResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/preReleaseVersions" : { + "get" : { + "tags" : [ "PreReleaseVersions" ], + "operationId" : "preReleaseVersions-get_collection", + "parameters" : [ { + "name" : "filter[builds.expired]", + "in" : "query", + "description" : "filter by attribute 'builds.expired'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[builds.processingState]", + "in" : "query", + "description" : "filter by attribute 'builds.processingState'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "PROCESSING", "FAILED", "INVALID", "VALID" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[platform]", + "in" : "query", + "description" : "filter by attribute 'platform'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IOS", "MAC_OS", "TV_OS" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[version]", + "in" : "query", + "description" : "filter by attribute 'version'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[app]", + "in" : "query", + "description" : "filter by id(s) of related 'app'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[builds]", + "in" : "query", + "description" : "filter by id(s) of related 'builds'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "sort", + "in" : "query", + "description" : "comma-separated list of sort expressions; resources will be sorted as specified", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "version", "-version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[preReleaseVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type preReleaseVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "builds", "platform", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "builds" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[builds]", + "in" : "query", + "description" : "maximum number of related builds returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of PreReleaseVersions", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PreReleaseVersionsResponse" + } + } + } + } + } + } + }, + "/v1/preReleaseVersions/{id}" : { + "get" : { + "tags" : [ "PreReleaseVersions" ], + "operationId" : "preReleaseVersions-get_instance", + "parameters" : [ { + "name" : "fields[preReleaseVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type preReleaseVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "builds", "platform", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "builds" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[builds]", + "in" : "query", + "description" : "maximum number of related builds returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single PrereleaseVersion", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PrereleaseVersionResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/profiles" : { + "get" : { + "tags" : [ "Profiles" ], + "operationId" : "profiles-get_collection", + "parameters" : [ { + "name" : "filter[name]", + "in" : "query", + "description" : "filter by attribute 'name'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[profileState]", + "in" : "query", + "description" : "filter by attribute 'profileState'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ACTIVE", "INVALID" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[profileType]", + "in" : "query", + "description" : "filter by attribute 'profileType'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IOS_APP_DEVELOPMENT", "IOS_APP_STORE", "IOS_APP_ADHOC", "IOS_APP_INHOUSE", "MAC_APP_DEVELOPMENT", "MAC_APP_STORE", "MAC_APP_DIRECT", "TVOS_APP_DEVELOPMENT", "TVOS_APP_STORE", "TVOS_APP_ADHOC", "TVOS_APP_INHOUSE", "MAC_CATALYST_APP_DEVELOPMENT", "MAC_CATALYST_APP_STORE", "MAC_CATALYST_APP_DIRECT" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[id]", + "in" : "query", + "description" : "filter by id(s)", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "sort", + "in" : "query", + "description" : "comma-separated list of sort expressions; resources will be sorted as specified", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "id", "-id", "name", "-name", "profileState", "-profileState", "profileType", "-profileType" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[profiles]", + "in" : "query", + "description" : "the fields to include for returned resources of type profiles", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "bundleId", "certificates", "createdDate", "devices", "expirationDate", "name", "platform", "profileContent", "profileState", "profileType", "uuid" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "bundleId", "certificates", "devices" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[certificates]", + "in" : "query", + "description" : "the fields to include for returned resources of type certificates", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "certificateContent", "certificateType", "csrContent", "displayName", "expirationDate", "name", "platform", "serialNumber" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[devices]", + "in" : "query", + "description" : "the fields to include for returned resources of type devices", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "addedDate", "deviceClass", "model", "name", "platform", "status", "udid" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[bundleIds]", + "in" : "query", + "description" : "the fields to include for returned resources of type bundleIds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "bundleIdCapabilities", "identifier", "name", "platform", "profiles", "seedId" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[certificates]", + "in" : "query", + "description" : "maximum number of related certificates returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[devices]", + "in" : "query", + "description" : "maximum number of related devices returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of Profiles", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProfilesResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "Profiles" ], + "operationId" : "profiles-create_instance", + "requestBody" : { + "description" : "Profile representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProfileCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single Profile", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProfileResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/profiles/{id}" : { + "get" : { + "tags" : [ "Profiles" ], + "operationId" : "profiles-get_instance", + "parameters" : [ { + "name" : "fields[profiles]", + "in" : "query", + "description" : "the fields to include for returned resources of type profiles", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "bundleId", "certificates", "createdDate", "devices", "expirationDate", "name", "platform", "profileContent", "profileState", "profileType", "uuid" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "bundleId", "certificates", "devices" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[certificates]", + "in" : "query", + "description" : "the fields to include for returned resources of type certificates", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "certificateContent", "certificateType", "csrContent", "displayName", "expirationDate", "name", "platform", "serialNumber" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[devices]", + "in" : "query", + "description" : "the fields to include for returned resources of type devices", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "addedDate", "deviceClass", "model", "name", "platform", "status", "udid" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[bundleIds]", + "in" : "query", + "description" : "the fields to include for returned resources of type bundleIds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "bundleIdCapabilities", "identifier", "name", "platform", "profiles", "seedId" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[certificates]", + "in" : "query", + "description" : "maximum number of related certificates returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + }, { + "name" : "limit[devices]", + "in" : "query", + "description" : "maximum number of related devices returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single Profile", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProfileResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "Profiles" ], + "operationId" : "profiles-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/routingAppCoverages" : { + "post" : { + "tags" : [ "RoutingAppCoverages" ], + "operationId" : "routingAppCoverages-create_instance", + "requestBody" : { + "description" : "RoutingAppCoverage representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RoutingAppCoverageCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single RoutingAppCoverage", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RoutingAppCoverageResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/routingAppCoverages/{id}" : { + "get" : { + "tags" : [ "RoutingAppCoverages" ], + "operationId" : "routingAppCoverages-get_instance", + "parameters" : [ { + "name" : "fields[routingAppCoverages]", + "in" : "query", + "description" : "the fields to include for returned resources of type routingAppCoverages", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion", "assetDeliveryState", "fileName", "fileSize", "sourceFileChecksum", "uploadOperations", "uploaded" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single RoutingAppCoverage", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RoutingAppCoverageResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "RoutingAppCoverages" ], + "operationId" : "routingAppCoverages-update_instance", + "requestBody" : { + "description" : "RoutingAppCoverage representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RoutingAppCoverageUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single RoutingAppCoverage", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RoutingAppCoverageResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "RoutingAppCoverages" ], + "operationId" : "routingAppCoverages-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/salesReports" : { + "get" : { + "tags" : [ "SalesReports" ], + "operationId" : "salesReports-get_collection", + "parameters" : [ { + "name" : "filter[frequency]", + "in" : "query", + "description" : "filter by attribute 'frequency'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "DAILY", "WEEKLY", "MONTHLY", "YEARLY" ] + } + }, + "style" : "form", + "explode" : false, + "required" : true + }, { + "name" : "filter[reportDate]", + "in" : "query", + "description" : "filter by attribute 'reportDate'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[reportSubType]", + "in" : "query", + "description" : "filter by attribute 'reportSubType'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "SUMMARY", "DETAILED", "OPT_IN" ] + } + }, + "style" : "form", + "explode" : false, + "required" : true + }, { + "name" : "filter[reportType]", + "in" : "query", + "description" : "filter by attribute 'reportType'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "SALES", "PRE_ORDER", "NEWSSTAND", "SUBSCRIPTION", "SUBSCRIPTION_EVENT", "SUBSCRIBER" ] + } + }, + "style" : "form", + "explode" : false, + "required" : true + }, { + "name" : "filter[vendorNumber]", + "in" : "query", + "description" : "filter by attribute 'vendorNumber'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : true + }, { + "name" : "filter[version]", + "in" : "query", + "description" : "filter by attribute 'version'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of SalesReports", + "content" : { + "gzip" : { + "schema" : { + "type" : "string", + "format" : "binary" + } + } + } + } + } + } + }, + "/v1/territories" : { + "get" : { + "tags" : [ "Territories" ], + "operationId" : "territories-get_collection", + "parameters" : [ { + "name" : "fields[territories]", + "in" : "query", + "description" : "the fields to include for returned resources of type territories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "currency" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of Territories", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TerritoriesResponse" + } + } + } + } + } + } + }, + "/v1/userInvitations" : { + "get" : { + "tags" : [ "UserInvitations" ], + "operationId" : "userInvitations-get_collection", + "parameters" : [ { + "name" : "filter[email]", + "in" : "query", + "description" : "filter by attribute 'email'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[roles]", + "in" : "query", + "description" : "filter by attribute 'roles'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ADMIN", "FINANCE", "TECHNICAL", "ACCOUNT_HOLDER", "READ_ONLY", "SALES", "MARKETING", "APP_MANAGER", "DEVELOPER", "ACCESS_TO_REPORTS", "CUSTOMER_SUPPORT" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[visibleApps]", + "in" : "query", + "description" : "filter by id(s) of related 'visibleApps'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "sort", + "in" : "query", + "description" : "comma-separated list of sort expressions; resources will be sorted as specified", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "email", "-email", "lastName", "-lastName" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[userInvitations]", + "in" : "query", + "description" : "the fields to include for returned resources of type userInvitations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "allAppsVisible", "email", "expirationDate", "firstName", "lastName", "provisioningAllowed", "roles", "visibleApps" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "visibleApps" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[visibleApps]", + "in" : "query", + "description" : "maximum number of related visibleApps returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of UserInvitations", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserInvitationsResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "UserInvitations" ], + "operationId" : "userInvitations-create_instance", + "requestBody" : { + "description" : "UserInvitation representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserInvitationCreateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "201" : { + "description" : "Single UserInvitation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserInvitationResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/v1/userInvitations/{id}" : { + "get" : { + "tags" : [ "UserInvitations" ], + "operationId" : "userInvitations-get_instance", + "parameters" : [ { + "name" : "fields[userInvitations]", + "in" : "query", + "description" : "the fields to include for returned resources of type userInvitations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "allAppsVisible", "email", "expirationDate", "firstName", "lastName", "provisioningAllowed", "roles", "visibleApps" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "visibleApps" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[visibleApps]", + "in" : "query", + "description" : "maximum number of related visibleApps returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single UserInvitation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserInvitationResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "UserInvitations" ], + "operationId" : "userInvitations-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/users" : { + "get" : { + "tags" : [ "Users" ], + "operationId" : "users-get_collection", + "parameters" : [ { + "name" : "filter[roles]", + "in" : "query", + "description" : "filter by attribute 'roles'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ADMIN", "FINANCE", "TECHNICAL", "ACCOUNT_HOLDER", "READ_ONLY", "SALES", "MARKETING", "APP_MANAGER", "DEVELOPER", "ACCESS_TO_REPORTS", "CUSTOMER_SUPPORT" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[username]", + "in" : "query", + "description" : "filter by attribute 'username'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "filter[visibleApps]", + "in" : "query", + "description" : "filter by id(s) of related 'visibleApps'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "sort", + "in" : "query", + "description" : "comma-separated list of sort expressions; resources will be sorted as specified", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "lastName", "-lastName", "username", "-username" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[users]", + "in" : "query", + "description" : "the fields to include for returned resources of type users", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "allAppsVisible", "firstName", "lastName", "provisioningAllowed", "roles", "username", "visibleApps" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "visibleApps" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[visibleApps]", + "in" : "query", + "description" : "maximum number of related visibleApps returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of Users", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UsersResponse" + } + } + } + } + } + } + }, + "/v1/users/{id}" : { + "get" : { + "tags" : [ "Users" ], + "operationId" : "users-get_instance", + "parameters" : [ { + "name" : "fields[users]", + "in" : "query", + "description" : "the fields to include for returned resources of type users", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "allAppsVisible", "firstName", "lastName", "provisioningAllowed", "roles", "username", "visibleApps" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "visibleApps" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false, + "required" : false + }, { + "name" : "limit[visibleApps]", + "in" : "query", + "description" : "maximum number of related visibleApps returned (when they are included)", + "schema" : { + "type" : "integer", + "maximum" : 50 + }, + "style" : "form", + "required" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single User", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "Users" ], + "operationId" : "users-update_instance", + "requestBody" : { + "description" : "User representation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserUpdateRequest" + } + } + }, + "required" : true + }, + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Single User", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "Users" ], + "operationId" : "users-delete_instance", + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appCategories/{id}/parent" : { + "get" : { + "tags" : [ "AppCategories" ], + "operationId" : "appCategories-parent-get_to_one_related", + "parameters" : [ { + "name" : "fields[appCategories]", + "in" : "query", + "description" : "the fields to include for returned resources of type appCategories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "parent", "platforms", "subcategories" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppCategoryResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appCategories/{id}/subcategories" : { + "get" : { + "tags" : [ "AppCategories" ], + "operationId" : "appCategories-subcategories-get_to_many_related", + "parameters" : [ { + "name" : "fields[appCategories]", + "in" : "query", + "description" : "the fields to include for returned resources of type appCategories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "parent", "platforms", "subcategories" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppCategoriesResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appEncryptionDeclarations/{id}/app" : { + "get" : { + "tags" : [ "AppEncryptionDeclarations" ], + "operationId" : "appEncryptionDeclarations-app-get_to_one_related", + "parameters" : [ { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appEncryptionDeclarations/{id}/relationships/builds" : { + "post" : { + "tags" : [ "AppEncryptionDeclarations" ], + "operationId" : "appEncryptionDeclarations-builds-create_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppEncryptionDeclarationBuildsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appInfos/{id}/appInfoLocalizations" : { + "get" : { + "tags" : [ "AppInfos" ], + "operationId" : "appInfos-appInfoLocalizations-get_to_many_related", + "parameters" : [ { + "name" : "filter[locale]", + "in" : "query", + "description" : "filter by attribute 'locale'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appInfos]", + "in" : "query", + "description" : "the fields to include for returned resources of type appInfos", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appInfoLocalizations", "appStoreAgeRating", "appStoreState", "brazilAgeRating", "kidsAgeBand", "primaryCategory", "primarySubcategoryOne", "primarySubcategoryTwo", "secondaryCategory", "secondarySubcategoryOne", "secondarySubcategoryTwo" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appInfoLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appInfoLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfo", "locale", "name", "privacyPolicyText", "privacyPolicyUrl", "subtitle" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfo" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfoLocalizationsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appInfos/{id}/primaryCategory" : { + "get" : { + "tags" : [ "AppInfos" ], + "operationId" : "appInfos-primaryCategory-get_to_one_related", + "parameters" : [ { + "name" : "fields[appCategories]", + "in" : "query", + "description" : "the fields to include for returned resources of type appCategories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "parent", "platforms", "subcategories" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppCategoryResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appInfos/{id}/primarySubcategoryOne" : { + "get" : { + "tags" : [ "AppInfos" ], + "operationId" : "appInfos-primarySubcategoryOne-get_to_one_related", + "parameters" : [ { + "name" : "fields[appCategories]", + "in" : "query", + "description" : "the fields to include for returned resources of type appCategories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "parent", "platforms", "subcategories" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppCategoryResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appInfos/{id}/primarySubcategoryTwo" : { + "get" : { + "tags" : [ "AppInfos" ], + "operationId" : "appInfos-primarySubcategoryTwo-get_to_one_related", + "parameters" : [ { + "name" : "fields[appCategories]", + "in" : "query", + "description" : "the fields to include for returned resources of type appCategories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "parent", "platforms", "subcategories" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppCategoryResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appInfos/{id}/secondaryCategory" : { + "get" : { + "tags" : [ "AppInfos" ], + "operationId" : "appInfos-secondaryCategory-get_to_one_related", + "parameters" : [ { + "name" : "fields[appCategories]", + "in" : "query", + "description" : "the fields to include for returned resources of type appCategories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "parent", "platforms", "subcategories" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppCategoryResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appInfos/{id}/secondarySubcategoryOne" : { + "get" : { + "tags" : [ "AppInfos" ], + "operationId" : "appInfos-secondarySubcategoryOne-get_to_one_related", + "parameters" : [ { + "name" : "fields[appCategories]", + "in" : "query", + "description" : "the fields to include for returned resources of type appCategories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "parent", "platforms", "subcategories" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppCategoryResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appInfos/{id}/secondarySubcategoryTwo" : { + "get" : { + "tags" : [ "AppInfos" ], + "operationId" : "appInfos-secondarySubcategoryTwo-get_to_one_related", + "parameters" : [ { + "name" : "fields[appCategories]", + "in" : "query", + "description" : "the fields to include for returned resources of type appCategories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "parent", "platforms", "subcategories" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppCategoryResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appPreviewSets/{id}/relationships/appPreviews" : { + "get" : { + "tags" : [ "AppPreviewSets" ], + "operationId" : "appPreviewSets-appPreviews-get_to_many_relationship", + "parameters" : [ { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreviewSetAppPreviewsLinkagesResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "AppPreviewSets" ], + "operationId" : "appPreviewSets-appPreviews-replace_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreviewSetAppPreviewsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appPreviewSets/{id}/appPreviews" : { + "get" : { + "tags" : [ "AppPreviewSets" ], + "operationId" : "appPreviewSets-appPreviews-get_to_many_related", + "parameters" : [ { + "name" : "fields[appPreviews]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPreviews", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviewSet", "assetDeliveryState", "fileName", "fileSize", "mimeType", "previewFrameTimeCode", "previewImage", "sourceFileChecksum", "uploadOperations", "uploaded", "videoUrl" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appPreviewSets]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPreviewSets", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviews", "appStoreVersionLocalization", "previewType" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviewSet" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreviewsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appPricePoints/{id}/territory" : { + "get" : { + "tags" : [ "AppPricePoints" ], + "operationId" : "appPricePoints-territory-get_to_one_related", + "parameters" : [ { + "name" : "fields[territories]", + "in" : "query", + "description" : "the fields to include for returned resources of type territories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "currency" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TerritoryResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appPriceTiers/{id}/pricePoints" : { + "get" : { + "tags" : [ "AppPriceTiers" ], + "operationId" : "appPriceTiers-pricePoints-get_to_many_related", + "parameters" : [ { + "name" : "fields[appPricePoints]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPricePoints", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "customerPrice", "priceTier", "proceeds", "territory" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPricePointsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appScreenshotSets/{id}/relationships/appScreenshots" : { + "get" : { + "tags" : [ "AppScreenshotSets" ], + "operationId" : "appScreenshotSets-appScreenshots-get_to_many_relationship", + "parameters" : [ { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppScreenshotSetAppScreenshotsLinkagesResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "AppScreenshotSets" ], + "operationId" : "appScreenshotSets-appScreenshots-replace_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppScreenshotSetAppScreenshotsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appScreenshotSets/{id}/appScreenshots" : { + "get" : { + "tags" : [ "AppScreenshotSets" ], + "operationId" : "appScreenshotSets-appScreenshots-get_to_many_related", + "parameters" : [ { + "name" : "fields[appScreenshotSets]", + "in" : "query", + "description" : "the fields to include for returned resources of type appScreenshotSets", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appScreenshots", "appStoreVersionLocalization", "screenshotDisplayType" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appScreenshots]", + "in" : "query", + "description" : "the fields to include for returned resources of type appScreenshots", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appScreenshotSet", "assetDeliveryState", "assetToken", "assetType", "fileName", "fileSize", "imageAsset", "sourceFileChecksum", "uploadOperations", "uploaded" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appScreenshotSet" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppScreenshotsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreReviewDetails/{id}/appStoreReviewAttachments" : { + "get" : { + "tags" : [ "AppStoreReviewDetails" ], + "operationId" : "appStoreReviewDetails-appStoreReviewAttachments-get_to_many_related", + "parameters" : [ { + "name" : "fields[appStoreReviewDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreReviewDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreReviewAttachments", "appStoreVersion", "contactEmail", "contactFirstName", "contactLastName", "contactPhone", "demoAccountName", "demoAccountPassword", "demoAccountRequired", "notes" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appStoreReviewAttachments]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreReviewAttachments", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreReviewDetail", "assetDeliveryState", "fileName", "fileSize", "sourceFileChecksum", "uploadOperations", "uploaded" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreReviewDetail" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreReviewAttachmentsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersionLocalizations/{id}/appPreviewSets" : { + "get" : { + "tags" : [ "AppStoreVersionLocalizations" ], + "operationId" : "appStoreVersionLocalizations-appPreviewSets-get_to_many_related", + "parameters" : [ { + "name" : "filter[previewType]", + "in" : "query", + "description" : "filter by attribute 'previewType'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IPHONE_65", "IPHONE_58", "IPHONE_55", "IPHONE_47", "IPHONE_40", "IPHONE_35", "IPAD_PRO_3GEN_129", "IPAD_PRO_3GEN_11", "IPAD_PRO_129", "IPAD_105", "IPAD_97", "DESKTOP", "WATCH_SERIES_4", "WATCH_SERIES_3", "APPLE_TV" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appStoreVersionLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersionLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviewSets", "appScreenshotSets", "appStoreVersion", "description", "keywords", "locale", "marketingUrl", "promotionalText", "supportUrl", "whatsNew" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appPreviews]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPreviews", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviewSet", "assetDeliveryState", "fileName", "fileSize", "mimeType", "previewFrameTimeCode", "previewImage", "sourceFileChecksum", "uploadOperations", "uploaded", "videoUrl" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appPreviewSets]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPreviewSets", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviews", "appStoreVersionLocalization", "previewType" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviews", "appStoreVersionLocalization" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreviewSetsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersionLocalizations/{id}/appScreenshotSets" : { + "get" : { + "tags" : [ "AppStoreVersionLocalizations" ], + "operationId" : "appStoreVersionLocalizations-appScreenshotSets-get_to_many_related", + "parameters" : [ { + "name" : "filter[screenshotDisplayType]", + "in" : "query", + "description" : "filter by attribute 'screenshotDisplayType'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "APP_IPHONE_65", "APP_IPHONE_58", "APP_IPHONE_55", "APP_IPHONE_47", "APP_IPHONE_40", "APP_IPHONE_35", "APP_IPAD_PRO_3GEN_129", "APP_IPAD_PRO_3GEN_11", "APP_IPAD_PRO_129", "APP_IPAD_105", "APP_IPAD_97", "APP_DESKTOP", "APP_WATCH_SERIES_4", "APP_WATCH_SERIES_3", "APP_APPLE_TV", "IMESSAGE_APP_IPHONE_65", "IMESSAGE_APP_IPHONE_58", "IMESSAGE_APP_IPHONE_55", "IMESSAGE_APP_IPHONE_47", "IMESSAGE_APP_IPHONE_40", "IMESSAGE_APP_IPAD_PRO_3GEN_129", "IMESSAGE_APP_IPAD_PRO_3GEN_11", "IMESSAGE_APP_IPAD_PRO_129", "IMESSAGE_APP_IPAD_105", "IMESSAGE_APP_IPAD_97" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appStoreVersionLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersionLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviewSets", "appScreenshotSets", "appStoreVersion", "description", "keywords", "locale", "marketingUrl", "promotionalText", "supportUrl", "whatsNew" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appScreenshotSets]", + "in" : "query", + "description" : "the fields to include for returned resources of type appScreenshotSets", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appScreenshots", "appStoreVersionLocalization", "screenshotDisplayType" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appScreenshots]", + "in" : "query", + "description" : "the fields to include for returned resources of type appScreenshots", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appScreenshotSet", "assetDeliveryState", "assetToken", "assetType", "fileName", "fileSize", "imageAsset", "sourceFileChecksum", "uploadOperations", "uploaded" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appScreenshots", "appStoreVersionLocalization" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppScreenshotSetsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersions/{id}/ageRatingDeclaration" : { + "get" : { + "tags" : [ "AppStoreVersions" ], + "operationId" : "appStoreVersions-ageRatingDeclaration-get_to_one_related", + "parameters" : [ { + "name" : "fields[ageRatingDeclarations]", + "in" : "query", + "description" : "the fields to include for returned resources of type ageRatingDeclarations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "alcoholTobaccoOrDrugUseOrReferences", "gamblingAndContests", "gamblingSimulated", "horrorOrFearThemes", "kidsAgeBand", "matureOrSuggestiveThemes", "medicalOrTreatmentInformation", "profanityOrCrudeHumor", "sexualContentGraphicAndNudity", "sexualContentOrNudity", "unrestrictedWebAccess", "violenceCartoonOrFantasy", "violenceRealistic", "violenceRealisticProlongedGraphicOrSadistic" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AgeRatingDeclarationResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersions/{id}/appStoreReviewDetail" : { + "get" : { + "tags" : [ "AppStoreVersions" ], + "operationId" : "appStoreVersions-appStoreReviewDetail-get_to_one_related", + "parameters" : [ { + "name" : "fields[appStoreReviewDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreReviewDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreReviewAttachments", "appStoreVersion", "contactEmail", "contactFirstName", "contactLastName", "contactPhone", "demoAccountName", "demoAccountPassword", "demoAccountRequired", "notes" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appStoreVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ageRatingDeclaration", "app", "appStoreReviewDetail", "appStoreState", "appStoreVersionLocalizations", "appStoreVersionPhasedRelease", "appStoreVersionSubmission", "build", "copyright", "createdDate", "downloadable", "earliestReleaseDate", "idfaDeclaration", "platform", "releaseType", "routingAppCoverage", "usesIdfa", "versionString" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appStoreReviewAttachments]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreReviewAttachments", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreReviewDetail", "assetDeliveryState", "fileName", "fileSize", "sourceFileChecksum", "uploadOperations", "uploaded" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreReviewAttachments", "appStoreVersion" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreReviewDetailResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersions/{id}/appStoreVersionLocalizations" : { + "get" : { + "tags" : [ "AppStoreVersions" ], + "operationId" : "appStoreVersions-appStoreVersionLocalizations-get_to_many_related", + "parameters" : [ { + "name" : "fields[appStoreVersionLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersionLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviewSets", "appScreenshotSets", "appStoreVersion", "description", "keywords", "locale", "marketingUrl", "promotionalText", "supportUrl", "whatsNew" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionLocalizationsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersions/{id}/appStoreVersionPhasedRelease" : { + "get" : { + "tags" : [ "AppStoreVersions" ], + "operationId" : "appStoreVersions-appStoreVersionPhasedRelease-get_to_one_related", + "parameters" : [ { + "name" : "fields[appStoreVersionPhasedReleases]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersionPhasedReleases", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion", "currentDayNumber", "phasedReleaseState", "startDate", "totalPauseDuration" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionPhasedReleaseResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersions/{id}/appStoreVersionSubmission" : { + "get" : { + "tags" : [ "AppStoreVersions" ], + "operationId" : "appStoreVersions-appStoreVersionSubmission-get_to_one_related", + "parameters" : [ { + "name" : "fields[appStoreVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ageRatingDeclaration", "app", "appStoreReviewDetail", "appStoreState", "appStoreVersionLocalizations", "appStoreVersionPhasedRelease", "appStoreVersionSubmission", "build", "copyright", "createdDate", "downloadable", "earliestReleaseDate", "idfaDeclaration", "platform", "releaseType", "routingAppCoverage", "usesIdfa", "versionString" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appStoreVersionSubmissions]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersionSubmissions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionSubmissionResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersions/{id}/relationships/build" : { + "get" : { + "tags" : [ "AppStoreVersions" ], + "operationId" : "appStoreVersions-build-get_to_one_relationship", + "parameters" : [ ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related linkage", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionBuildLinkageResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "AppStoreVersions" ], + "operationId" : "appStoreVersions-build-update_to_one_relationship", + "requestBody" : { + "description" : "Related linkage", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionBuildLinkageRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersions/{id}/build" : { + "get" : { + "tags" : [ "AppStoreVersions" ], + "operationId" : "appStoreVersions-build-get_to_one_related", + "parameters" : [ { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersions/{id}/idfaDeclaration" : { + "get" : { + "tags" : [ "AppStoreVersions" ], + "operationId" : "appStoreVersions-idfaDeclaration-get_to_one_related", + "parameters" : [ { + "name" : "fields[idfaDeclarations]", + "in" : "query", + "description" : "the fields to include for returned resources of type idfaDeclarations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion", "attributesActionWithPreviousAd", "attributesAppInstallationToPreviousAd", "honorsLimitedAdTracking", "servesAds" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/IdfaDeclarationResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/appStoreVersions/{id}/routingAppCoverage" : { + "get" : { + "tags" : [ "AppStoreVersions" ], + "operationId" : "appStoreVersions-routingAppCoverage-get_to_one_related", + "parameters" : [ { + "name" : "fields[routingAppCoverages]", + "in" : "query", + "description" : "the fields to include for returned resources of type routingAppCoverages", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion", "assetDeliveryState", "fileName", "fileSize", "sourceFileChecksum", "uploadOperations", "uploaded" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RoutingAppCoverageResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/appInfos" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-appInfos-get_to_many_related", + "parameters" : [ { + "name" : "fields[appInfos]", + "in" : "query", + "description" : "the fields to include for returned resources of type appInfos", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appInfoLocalizations", "appStoreAgeRating", "appStoreState", "brazilAgeRating", "kidsAgeBand", "primaryCategory", "primarySubcategoryOne", "primarySubcategoryTwo", "secondaryCategory", "secondarySubcategoryOne", "secondarySubcategoryTwo" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appCategories]", + "in" : "query", + "description" : "the fields to include for returned resources of type appCategories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "parent", "platforms", "subcategories" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appInfoLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appInfoLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfo", "locale", "name", "privacyPolicyText", "privacyPolicyUrl", "subtitle" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appInfoLocalizations", "primaryCategory", "primarySubcategoryOne", "primarySubcategoryTwo", "secondaryCategory", "secondarySubcategoryOne", "secondarySubcategoryTwo" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppInfosResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/appStoreVersions" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-appStoreVersions-get_to_many_related", + "parameters" : [ { + "name" : "filter[appStoreState]", + "in" : "query", + "description" : "filter by attribute 'appStoreState'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "DEVELOPER_REMOVED_FROM_SALE", "DEVELOPER_REJECTED", "IN_REVIEW", "INVALID_BINARY", "METADATA_REJECTED", "PENDING_APPLE_RELEASE", "PENDING_CONTRACT", "PENDING_DEVELOPER_RELEASE", "PREPARE_FOR_SUBMISSION", "PREORDER_READY_FOR_SALE", "PROCESSING_FOR_APP_STORE", "READY_FOR_SALE", "REJECTED", "REMOVED_FROM_SALE", "WAITING_FOR_EXPORT_COMPLIANCE", "WAITING_FOR_REVIEW", "REPLACED_WITH_NEW_VERSION" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "filter[platform]", + "in" : "query", + "description" : "filter by attribute 'platform'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IOS", "MAC_OS", "TV_OS" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "filter[versionString]", + "in" : "query", + "description" : "filter by attribute 'versionString'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "filter[id]", + "in" : "query", + "description" : "filter by id(s)", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[idfaDeclarations]", + "in" : "query", + "description" : "the fields to include for returned resources of type idfaDeclarations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion", "attributesActionWithPreviousAd", "attributesAppInstallationToPreviousAd", "honorsLimitedAdTracking", "servesAds" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appStoreVersionLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersionLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appPreviewSets", "appScreenshotSets", "appStoreVersion", "description", "keywords", "locale", "marketingUrl", "promotionalText", "supportUrl", "whatsNew" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[routingAppCoverages]", + "in" : "query", + "description" : "the fields to include for returned resources of type routingAppCoverages", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion", "assetDeliveryState", "fileName", "fileSize", "sourceFileChecksum", "uploadOperations", "uploaded" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appStoreVersionPhasedReleases]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersionPhasedReleases", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion", "currentDayNumber", "phasedReleaseState", "startDate", "totalPauseDuration" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[ageRatingDeclarations]", + "in" : "query", + "description" : "the fields to include for returned resources of type ageRatingDeclarations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "alcoholTobaccoOrDrugUseOrReferences", "gamblingAndContests", "gamblingSimulated", "horrorOrFearThemes", "kidsAgeBand", "matureOrSuggestiveThemes", "medicalOrTreatmentInformation", "profanityOrCrudeHumor", "sexualContentGraphicAndNudity", "sexualContentOrNudity", "unrestrictedWebAccess", "violenceCartoonOrFantasy", "violenceRealistic", "violenceRealisticProlongedGraphicOrSadistic" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appStoreReviewDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreReviewDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreReviewAttachments", "appStoreVersion", "contactEmail", "contactFirstName", "contactLastName", "contactPhone", "demoAccountName", "demoAccountPassword", "demoAccountRequired", "notes" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appStoreVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ageRatingDeclaration", "app", "appStoreReviewDetail", "appStoreState", "appStoreVersionLocalizations", "appStoreVersionPhasedRelease", "appStoreVersionSubmission", "build", "copyright", "createdDate", "downloadable", "earliestReleaseDate", "idfaDeclaration", "platform", "releaseType", "routingAppCoverage", "usesIdfa", "versionString" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appStoreVersionSubmissions]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersionSubmissions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appStoreVersion" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ageRatingDeclaration", "app", "appStoreReviewDetail", "appStoreVersionLocalizations", "appStoreVersionPhasedRelease", "appStoreVersionSubmission", "build", "idfaDeclaration", "routingAppCoverage" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/availableTerritories" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-availableTerritories-get_to_many_related", + "parameters" : [ { + "name" : "fields[territories]", + "in" : "query", + "description" : "the fields to include for returned resources of type territories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "currency" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TerritoriesResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/betaAppLocalizations" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-betaAppLocalizations-get_to_many_related", + "parameters" : [ { + "name" : "fields[betaAppLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "description", "feedbackEmail", "locale", "marketingUrl", "privacyPolicyUrl", "tvOsPrivacyPolicy" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppLocalizationsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/betaAppReviewDetail" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-betaAppReviewDetail-get_to_one_related", + "parameters" : [ { + "name" : "fields[betaAppReviewDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppReviewDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "contactEmail", "contactFirstName", "contactLastName", "contactPhone", "demoAccountName", "demoAccountPassword", "demoAccountRequired", "notes" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppReviewDetailResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/betaGroups" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-betaGroups-get_to_many_related", + "parameters" : [ { + "name" : "fields[betaGroups]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaGroups", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "betaTesters", "builds", "createdDate", "feedbackEnabled", "isInternalGroup", "name", "publicLink", "publicLinkEnabled", "publicLinkId", "publicLinkLimit", "publicLinkLimitEnabled" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaGroupsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/betaLicenseAgreement" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-betaLicenseAgreement-get_to_one_related", + "parameters" : [ { + "name" : "fields[betaLicenseAgreements]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaLicenseAgreements", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "agreementText", "app" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaLicenseAgreementResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/relationships/betaTesters" : { + "delete" : { + "tags" : [ "Apps" ], + "operationId" : "apps-betaTesters-delete_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppBetaTestersLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/builds" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-builds-get_to_many_related", + "parameters" : [ { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/endUserLicenseAgreement" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-endUserLicenseAgreement-get_to_one_related", + "parameters" : [ { + "name" : "fields[endUserLicenseAgreements]", + "in" : "query", + "description" : "the fields to include for returned resources of type endUserLicenseAgreements", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "agreementText", "app", "territories" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EndUserLicenseAgreementResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/gameCenterEnabledVersions" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-gameCenterEnabledVersions-get_to_many_related", + "parameters" : [ { + "name" : "filter[platform]", + "in" : "query", + "description" : "filter by attribute 'platform'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IOS", "MAC_OS", "TV_OS" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "filter[versionString]", + "in" : "query", + "description" : "filter by attribute 'versionString'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "filter[id]", + "in" : "query", + "description" : "filter by id(s)", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "sort", + "in" : "query", + "description" : "comma-separated list of sort expressions; resources will be sorted as specified", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "versionString", "-versionString" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[gameCenterEnabledVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type gameCenterEnabledVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "compatibleVersions", "iconAsset", "platform", "versionString" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "compatibleVersions" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GameCenterEnabledVersionsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/inAppPurchases" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-inAppPurchases-get_to_many_related", + "parameters" : [ { + "name" : "filter[inAppPurchaseType]", + "in" : "query", + "description" : "filter by attribute 'inAppPurchaseType'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "AUTOMATICALLY_RENEWABLE_SUBSCRIPTION", "NON_CONSUMABLE", "CONSUMABLE", "NON_RENEWING_SUBSCRIPTION", "FREE_SUBSCRIPTION" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "filter[canBeSubmitted]", + "in" : "query", + "description" : "filter by canBeSubmitted", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "sort", + "in" : "query", + "description" : "comma-separated list of sort expressions; resources will be sorted as specified", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "inAppPurchaseType", "-inAppPurchaseType", "productId", "-productId", "referenceName", "-referenceName" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[inAppPurchases]", + "in" : "query", + "description" : "the fields to include for returned resources of type inAppPurchases", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps", "inAppPurchaseType", "productId", "referenceName", "state" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/InAppPurchasesResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/perfPowerMetrics" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-perfPowerMetrics-get_to_many_related", + "parameters" : [ { + "name" : "filter[deviceType]", + "in" : "query", + "description" : "filter by attribute 'deviceType'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "filter[metricType]", + "in" : "query", + "description" : "filter by attribute 'metricType'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "DISK", "HANG", "BATTERY", "LAUNCH", "MEMORY", "ANIMATION" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "filter[platform]", + "in" : "query", + "description" : "filter by attribute 'platform'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IOS" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PerfPowerMetricsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/preOrder" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-preOrder-get_to_one_related", + "parameters" : [ { + "name" : "fields[appPreOrders]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPreOrders", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appReleaseDate", "preOrderAvailableDate" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPreOrderResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/preReleaseVersions" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-preReleaseVersions-get_to_many_related", + "parameters" : [ { + "name" : "fields[preReleaseVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type preReleaseVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "builds", "platform", "version" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PreReleaseVersionsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/apps/{id}/prices" : { + "get" : { + "tags" : [ "Apps" ], + "operationId" : "apps-prices-get_to_many_related", + "parameters" : [ { + "name" : "fields[appPrices]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPrices", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "priceTier" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[appPriceTiers]", + "in" : "query", + "description" : "the fields to include for returned resources of type appPriceTiers", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "pricePoints" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "priceTier" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppPricesResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaAppLocalizations/{id}/app" : { + "get" : { + "tags" : [ "BetaAppLocalizations" ], + "operationId" : "betaAppLocalizations-app-get_to_one_related", + "parameters" : [ { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaAppReviewDetails/{id}/app" : { + "get" : { + "tags" : [ "BetaAppReviewDetails" ], + "operationId" : "betaAppReviewDetails-app-get_to_one_related", + "parameters" : [ { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaAppReviewSubmissions/{id}/build" : { + "get" : { + "tags" : [ "BetaAppReviewSubmissions" ], + "operationId" : "betaAppReviewSubmissions-build-get_to_one_related", + "parameters" : [ { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaBuildLocalizations/{id}/build" : { + "get" : { + "tags" : [ "BetaBuildLocalizations" ], + "operationId" : "betaBuildLocalizations-build-get_to_one_related", + "parameters" : [ { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaGroups/{id}/app" : { + "get" : { + "tags" : [ "BetaGroups" ], + "operationId" : "betaGroups-app-get_to_one_related", + "parameters" : [ { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaGroups/{id}/relationships/betaTesters" : { + "get" : { + "tags" : [ "BetaGroups" ], + "operationId" : "betaGroups-betaTesters-get_to_many_relationship", + "parameters" : [ { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaGroupBetaTestersLinkagesResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "BetaGroups" ], + "operationId" : "betaGroups-betaTesters-create_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaGroupBetaTestersLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "delete" : { + "tags" : [ "BetaGroups" ], + "operationId" : "betaGroups-betaTesters-delete_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaGroupBetaTestersLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaGroups/{id}/betaTesters" : { + "get" : { + "tags" : [ "BetaGroups" ], + "operationId" : "betaGroups-betaTesters-get_to_many_related", + "parameters" : [ { + "name" : "fields[betaTesters]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaTesters", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps", "betaGroups", "builds", "email", "firstName", "inviteType", "lastName" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTestersResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaGroups/{id}/relationships/builds" : { + "get" : { + "tags" : [ "BetaGroups" ], + "operationId" : "betaGroups-builds-get_to_many_relationship", + "parameters" : [ { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaGroupBuildsLinkagesResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "BetaGroups" ], + "operationId" : "betaGroups-builds-create_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaGroupBuildsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "delete" : { + "tags" : [ "BetaGroups" ], + "operationId" : "betaGroups-builds-delete_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaGroupBuildsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaGroups/{id}/builds" : { + "get" : { + "tags" : [ "BetaGroups" ], + "operationId" : "betaGroups-builds-get_to_many_related", + "parameters" : [ { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaLicenseAgreements/{id}/app" : { + "get" : { + "tags" : [ "BetaLicenseAgreements" ], + "operationId" : "betaLicenseAgreements-app-get_to_one_related", + "parameters" : [ { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaTesters/{id}/relationships/apps" : { + "get" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-apps-get_to_many_relationship", + "parameters" : [ { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTesterAppsLinkagesResponse" + } + } + } + } + } + }, + "delete" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-apps-delete_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTesterAppsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaTesters/{id}/apps" : { + "get" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-apps-get_to_many_related", + "parameters" : [ { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaTesters/{id}/relationships/betaGroups" : { + "get" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-betaGroups-get_to_many_relationship", + "parameters" : [ { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTesterBetaGroupsLinkagesResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-betaGroups-create_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTesterBetaGroupsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "delete" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-betaGroups-delete_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTesterBetaGroupsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaTesters/{id}/betaGroups" : { + "get" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-betaGroups-get_to_many_related", + "parameters" : [ { + "name" : "fields[betaGroups]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaGroups", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "betaTesters", "builds", "createdDate", "feedbackEnabled", "isInternalGroup", "name", "publicLink", "publicLinkEnabled", "publicLinkId", "publicLinkLimit", "publicLinkLimitEnabled" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaGroupsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaTesters/{id}/relationships/builds" : { + "get" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-builds-get_to_many_relationship", + "parameters" : [ { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTesterBuildsLinkagesResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-builds-create_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTesterBuildsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "delete" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-builds-delete_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTesterBuildsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/betaTesters/{id}/builds" : { + "get" : { + "tags" : [ "BetaTesters" ], + "operationId" : "betaTesters-builds-get_to_many_related", + "parameters" : [ { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/buildBetaDetails/{id}/build" : { + "get" : { + "tags" : [ "BuildBetaDetails" ], + "operationId" : "buildBetaDetails-build-get_to_one_related", + "parameters" : [ { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/builds/{id}/app" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-app-get_to_one_related", + "parameters" : [ { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/builds/{id}/relationships/appEncryptionDeclaration" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-appEncryptionDeclaration-get_to_one_relationship", + "parameters" : [ ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related linkage", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildAppEncryptionDeclarationLinkageResponse" + } + } + } + } + } + }, + "patch" : { + "tags" : [ "Builds" ], + "operationId" : "builds-appEncryptionDeclaration-update_to_one_relationship", + "requestBody" : { + "description" : "Related linkage", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildAppEncryptionDeclarationLinkageRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/builds/{id}/appEncryptionDeclaration" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-appEncryptionDeclaration-get_to_one_related", + "parameters" : [ { + "name" : "fields[appEncryptionDeclarations]", + "in" : "query", + "description" : "the fields to include for returned resources of type appEncryptionDeclarations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclarationState", "availableOnFrenchStore", "builds", "codeValue", "containsProprietaryCryptography", "containsThirdPartyCryptography", "documentName", "documentType", "documentUrl", "exempt", "platform", "uploadedDate", "usesEncryption" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppEncryptionDeclarationResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/builds/{id}/appStoreVersion" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-appStoreVersion-get_to_one_related", + "parameters" : [ { + "name" : "fields[appStoreVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type appStoreVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "ageRatingDeclaration", "app", "appStoreReviewDetail", "appStoreState", "appStoreVersionLocalizations", "appStoreVersionPhasedRelease", "appStoreVersionSubmission", "build", "copyright", "createdDate", "downloadable", "earliestReleaseDate", "idfaDeclaration", "platform", "releaseType", "routingAppCoverage", "usesIdfa", "versionString" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppStoreVersionResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/builds/{id}/betaAppReviewSubmission" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-betaAppReviewSubmission-get_to_one_related", + "parameters" : [ { + "name" : "fields[betaAppReviewSubmissions]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaAppReviewSubmissions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "betaReviewState", "build" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaAppReviewSubmissionResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/builds/{id}/betaBuildLocalizations" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-betaBuildLocalizations-get_to_many_related", + "parameters" : [ { + "name" : "fields[betaBuildLocalizations]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaBuildLocalizations", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "build", "locale", "whatsNew" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaBuildLocalizationsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/builds/{id}/relationships/betaGroups" : { + "post" : { + "tags" : [ "Builds" ], + "operationId" : "builds-betaGroups-create_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildBetaGroupsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "delete" : { + "tags" : [ "Builds" ], + "operationId" : "builds-betaGroups-delete_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildBetaGroupsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/builds/{id}/buildBetaDetail" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-buildBetaDetail-get_to_one_related", + "parameters" : [ { + "name" : "fields[buildBetaDetails]", + "in" : "query", + "description" : "the fields to include for returned resources of type buildBetaDetails", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "autoNotifyEnabled", "build", "externalBuildState", "internalBuildState" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildBetaDetailResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/builds/{id}/diagnosticSignatures" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-diagnosticSignatures-get_to_many_related", + "parameters" : [ { + "name" : "filter[diagnosticType]", + "in" : "query", + "description" : "filter by attribute 'diagnosticType'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "DISK_WRITES" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[diagnosticSignatures]", + "in" : "query", + "description" : "the fields to include for returned resources of type diagnosticSignatures", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "diagnosticType", "logs", "signature", "weight" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DiagnosticSignaturesResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/builds/{id}/icons" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-icons-get_to_many_related", + "parameters" : [ { + "name" : "fields[buildIcons]", + "in" : "query", + "description" : "the fields to include for returned resources of type buildIcons", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "iconAsset", "iconType" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildIconsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/builds/{id}/relationships/individualTesters" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-individualTesters-get_to_many_relationship", + "parameters" : [ { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildIndividualTestersLinkagesResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "Builds" ], + "operationId" : "builds-individualTesters-create_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildIndividualTestersLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "delete" : { + "tags" : [ "Builds" ], + "operationId" : "builds-individualTesters-delete_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildIndividualTestersLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/builds/{id}/individualTesters" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-individualTesters-get_to_many_related", + "parameters" : [ { + "name" : "fields[betaTesters]", + "in" : "query", + "description" : "the fields to include for returned resources of type betaTesters", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "apps", "betaGroups", "builds", "email", "firstName", "inviteType", "lastName" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BetaTestersResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/builds/{id}/perfPowerMetrics" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-perfPowerMetrics-get_to_many_related", + "parameters" : [ { + "name" : "filter[deviceType]", + "in" : "query", + "description" : "filter by attribute 'deviceType'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "filter[metricType]", + "in" : "query", + "description" : "filter by attribute 'metricType'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "DISK", "HANG", "BATTERY", "LAUNCH", "MEMORY", "ANIMATION" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "filter[platform]", + "in" : "query", + "description" : "filter by attribute 'platform'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IOS" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PerfPowerMetricsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/builds/{id}/preReleaseVersion" : { + "get" : { + "tags" : [ "Builds" ], + "operationId" : "builds-preReleaseVersion-get_to_one_related", + "parameters" : [ { + "name" : "fields[preReleaseVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type preReleaseVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "builds", "platform", "version" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PrereleaseVersionResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/bundleIds/{id}/app" : { + "get" : { + "tags" : [ "BundleIds" ], + "operationId" : "bundleIds-app-get_to_one_related", + "parameters" : [ { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/bundleIds/{id}/bundleIdCapabilities" : { + "get" : { + "tags" : [ "BundleIds" ], + "operationId" : "bundleIds-bundleIdCapabilities-get_to_many_related", + "parameters" : [ { + "name" : "fields[bundleIdCapabilities]", + "in" : "query", + "description" : "the fields to include for returned resources of type bundleIdCapabilities", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "bundleId", "capabilityType", "settings" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleIdCapabilitiesResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/bundleIds/{id}/profiles" : { + "get" : { + "tags" : [ "BundleIds" ], + "operationId" : "bundleIds-profiles-get_to_many_related", + "parameters" : [ { + "name" : "fields[profiles]", + "in" : "query", + "description" : "the fields to include for returned resources of type profiles", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "bundleId", "certificates", "createdDate", "devices", "expirationDate", "name", "platform", "profileContent", "profileState", "profileType", "uuid" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ProfilesResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/diagnosticSignatures/{id}/logs" : { + "get" : { + "tags" : [ "DiagnosticSignatures" ], + "operationId" : "diagnosticSignatures-logs-get_to_many_related", + "parameters" : [ { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DiagnosticLogsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/endUserLicenseAgreements/{id}/territories" : { + "get" : { + "tags" : [ "EndUserLicenseAgreements" ], + "operationId" : "endUserLicenseAgreements-territories-get_to_many_related", + "parameters" : [ { + "name" : "fields[territories]", + "in" : "query", + "description" : "the fields to include for returned resources of type territories", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "currency" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TerritoriesResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/gameCenterEnabledVersions/{id}/relationships/compatibleVersions" : { + "get" : { + "tags" : [ "GameCenterEnabledVersions" ], + "operationId" : "gameCenterEnabledVersions-compatibleVersions-get_to_many_relationship", + "parameters" : [ { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GameCenterEnabledVersionCompatibleVersionsLinkagesResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "GameCenterEnabledVersions" ], + "operationId" : "gameCenterEnabledVersions-compatibleVersions-create_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GameCenterEnabledVersionCompatibleVersionsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "patch" : { + "tags" : [ "GameCenterEnabledVersions" ], + "operationId" : "gameCenterEnabledVersions-compatibleVersions-replace_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GameCenterEnabledVersionCompatibleVersionsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "delete" : { + "tags" : [ "GameCenterEnabledVersions" ], + "operationId" : "gameCenterEnabledVersions-compatibleVersions-delete_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GameCenterEnabledVersionCompatibleVersionsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/gameCenterEnabledVersions/{id}/compatibleVersions" : { + "get" : { + "tags" : [ "GameCenterEnabledVersions" ], + "operationId" : "gameCenterEnabledVersions-compatibleVersions-get_to_many_related", + "parameters" : [ { + "name" : "filter[platform]", + "in" : "query", + "description" : "filter by attribute 'platform'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "IOS", "MAC_OS", "TV_OS" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "filter[versionString]", + "in" : "query", + "description" : "filter by attribute 'versionString'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "filter[app]", + "in" : "query", + "description" : "filter by id(s) of related 'app'", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "filter[id]", + "in" : "query", + "description" : "filter by id(s)", + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "sort", + "in" : "query", + "description" : "comma-separated list of sort expressions; resources will be sorted as specified", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "versionString", "-versionString" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[gameCenterEnabledVersions]", + "in" : "query", + "description" : "the fields to include for returned resources of type gameCenterEnabledVersions", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "compatibleVersions", "iconAsset", "platform", "versionString" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + }, { + "name" : "include", + "in" : "query", + "description" : "comma-separated list of relationships to include", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "compatibleVersions" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GameCenterEnabledVersionsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/preReleaseVersions/{id}/app" : { + "get" : { + "tags" : [ "PreReleaseVersions" ], + "operationId" : "preReleaseVersions-app-get_to_one_related", + "parameters" : [ { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/preReleaseVersions/{id}/builds" : { + "get" : { + "tags" : [ "PreReleaseVersions" ], + "operationId" : "preReleaseVersions-builds-get_to_many_related", + "parameters" : [ { + "name" : "fields[builds]", + "in" : "query", + "description" : "the fields to include for returned resources of type builds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "appEncryptionDeclaration", "appStoreVersion", "betaAppReviewSubmission", "betaBuildLocalizations", "betaGroups", "buildBetaDetail", "diagnosticSignatures", "expirationDate", "expired", "iconAssetToken", "icons", "individualTesters", "minOsVersion", "perfPowerMetrics", "preReleaseVersion", "processingState", "uploadedDate", "usesNonExemptEncryption", "version" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/profiles/{id}/bundleId" : { + "get" : { + "tags" : [ "Profiles" ], + "operationId" : "profiles-bundleId-get_to_one_related", + "parameters" : [ { + "name" : "fields[bundleIds]", + "in" : "query", + "description" : "the fields to include for returned resources of type bundleIds", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "app", "bundleIdCapabilities", "identifier", "name", "platform", "profiles", "seedId" ] + } + }, + "style" : "form", + "explode" : false + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "Related resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BundleIdResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/profiles/{id}/certificates" : { + "get" : { + "tags" : [ "Profiles" ], + "operationId" : "profiles-certificates-get_to_many_related", + "parameters" : [ { + "name" : "fields[certificates]", + "in" : "query", + "description" : "the fields to include for returned resources of type certificates", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "certificateContent", "certificateType", "csrContent", "displayName", "expirationDate", "name", "platform", "serialNumber" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CertificatesResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/profiles/{id}/devices" : { + "get" : { + "tags" : [ "Profiles" ], + "operationId" : "profiles-devices-get_to_many_related", + "parameters" : [ { + "name" : "fields[devices]", + "in" : "query", + "description" : "the fields to include for returned resources of type devices", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "addedDate", "deviceClass", "model", "name", "platform", "status", "udid" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DevicesResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/userInvitations/{id}/visibleApps" : { + "get" : { + "tags" : [ "UserInvitations" ], + "operationId" : "userInvitations-visibleApps-get_to_many_related", + "parameters" : [ { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/users/{id}/relationships/visibleApps" : { + "get" : { + "tags" : [ "Users" ], + "operationId" : "users-visibleApps-get_to_many_relationship", + "parameters" : [ { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserVisibleAppsLinkagesResponse" + } + } + } + } + } + }, + "post" : { + "tags" : [ "Users" ], + "operationId" : "users-visibleApps-create_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserVisibleAppsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "patch" : { + "tags" : [ "Users" ], + "operationId" : "users-visibleApps-replace_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserVisibleAppsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "delete" : { + "tags" : [ "Users" ], + "operationId" : "users-visibleApps-delete_to_many_relationship", + "requestBody" : { + "description" : "List of related linkages", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserVisibleAppsLinkagesRequest" + } + } + }, + "required" : true + }, + "responses" : { + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "409" : { + "description" : "Request entity error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "204" : { + "description" : "Success (no content)" + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + }, + "/v1/users/{id}/visibleApps" : { + "get" : { + "tags" : [ "Users" ], + "operationId" : "users-visibleApps-get_to_many_related", + "parameters" : [ { + "name" : "fields[apps]", + "in" : "query", + "description" : "the fields to include for returned resources of type apps", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "appInfos", "appStoreVersions", "availableInNewTerritories", "availableTerritories", "betaAppLocalizations", "betaAppReviewDetail", "betaGroups", "betaLicenseAgreement", "betaTesters", "builds", "bundleId", "contentRightsDeclaration", "endUserLicenseAgreement", "gameCenterEnabledVersions", "inAppPurchases", "isOrEverWasMadeForKids", "name", "perfPowerMetrics", "preOrder", "preReleaseVersions", "prices", "primaryLocale", "sku" ] + } + }, + "style" : "form", + "explode" : false + }, { + "name" : "limit", + "in" : "query", + "description" : "maximum resources per page", + "schema" : { + "type" : "integer", + "maximum" : 200 + }, + "style" : "form" + } ], + "responses" : { + "400" : { + "description" : "Parameter error(s)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "403" : { + "description" : "Forbidden error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Not found error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "200" : { + "description" : "List of related resources", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AppsResponse" + } + } + } + } + } + }, + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "the id of the requested resource", + "schema" : { + "type" : "string" + }, + "style" : "simple", + "required" : true + } ] + } + }, + "components" : { + "schemas" : { + "AgeRatingDeclaration" : { + "type" : "object", + "title" : "AgeRatingDeclaration", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "ageRatingDeclarations" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "alcoholTobaccoOrDrugUseOrReferences" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "gamblingAndContests" : { + "type" : "boolean" + }, + "gamblingSimulated" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "kidsAgeBand" : { + "$ref" : "#/components/schemas/KidsAgeBand" + }, + "medicalOrTreatmentInformation" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "profanityOrCrudeHumor" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "sexualContentGraphicAndNudity" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "sexualContentOrNudity" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "horrorOrFearThemes" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "matureOrSuggestiveThemes" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "unrestrictedWebAccess" : { + "type" : "boolean" + }, + "violenceCartoonOrFantasy" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "violenceRealisticProlongedGraphicOrSadistic" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "violenceRealistic" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AgeRatingDeclarationResponse" : { + "type" : "object", + "title" : "AgeRatingDeclarationResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AgeRatingDeclaration" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AgeRatingDeclarationUpdateRequest" : { + "type" : "object", + "title" : "AgeRatingDeclarationUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "ageRatingDeclarations" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "alcoholTobaccoOrDrugUseOrReferences" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "gamblingAndContests" : { + "type" : "boolean" + }, + "gamblingSimulated" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "kidsAgeBand" : { + "$ref" : "#/components/schemas/KidsAgeBand" + }, + "medicalOrTreatmentInformation" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "profanityOrCrudeHumor" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "sexualContentGraphicAndNudity" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "sexualContentOrNudity" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "horrorOrFearThemes" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "matureOrSuggestiveThemes" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "unrestrictedWebAccess" : { + "type" : "boolean" + }, + "violenceCartoonOrFantasy" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "violenceRealisticProlongedGraphicOrSadistic" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + }, + "violenceRealistic" : { + "type" : "string", + "enum" : [ "NONE", "INFREQUENT_OR_MILD", "FREQUENT_OR_INTENSE" ] + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppCategory" : { + "type" : "object", + "title" : "AppCategory", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "platforms" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Platform" + } + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "subcategories" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "parent" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppCategoriesResponse" : { + "type" : "object", + "title" : "AppCategoriesResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppCategory" + } + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/AppCategory" + }, { + "$ref" : "#/components/schemas/AppCategory" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppCategoryResponse" : { + "type" : "object", + "title" : "AppCategoryResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppCategory" + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/AppCategory" + }, { + "$ref" : "#/components/schemas/AppCategory" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppEncryptionDeclaration" : { + "type" : "object", + "title" : "AppEncryptionDeclaration", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appEncryptionDeclarations" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "usesEncryption" : { + "type" : "boolean" + }, + "exempt" : { + "type" : "boolean" + }, + "containsProprietaryCryptography" : { + "type" : "boolean" + }, + "containsThirdPartyCryptography" : { + "type" : "boolean" + }, + "availableOnFrenchStore" : { + "type" : "boolean" + }, + "platform" : { + "$ref" : "#/components/schemas/Platform" + }, + "uploadedDate" : { + "type" : "string", + "format" : "date-time" + }, + "documentUrl" : { + "type" : "string" + }, + "documentName" : { + "type" : "string" + }, + "documentType" : { + "type" : "string" + }, + "appEncryptionDeclarationState" : { + "$ref" : "#/components/schemas/AppEncryptionDeclarationState" + }, + "codeValue" : { + "type" : "string" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppEncryptionDeclarationsResponse" : { + "type" : "object", + "title" : "AppEncryptionDeclarationsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppEncryptionDeclaration" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/App" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppEncryptionDeclarationResponse" : { + "type" : "object", + "title" : "AppEncryptionDeclarationResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppEncryptionDeclaration" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/App" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppInfoLocalization" : { + "type" : "object", + "title" : "AppInfoLocalization", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appInfoLocalizations" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "locale" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "subtitle" : { + "type" : "string" + }, + "privacyPolicyUrl" : { + "type" : "string" + }, + "privacyPolicyText" : { + "type" : "string" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "appInfo" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appInfos" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppInfoLocalizationsResponse" : { + "type" : "object", + "title" : "AppInfoLocalizationsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppInfoLocalization" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppInfoLocalizationResponse" : { + "type" : "object", + "title" : "AppInfoLocalizationResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppInfoLocalization" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppInfoLocalizationCreateRequest" : { + "type" : "object", + "title" : "AppInfoLocalizationCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appInfoLocalizations" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "locale" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "subtitle" : { + "type" : "string" + }, + "privacyPolicyUrl" : { + "type" : "string" + }, + "privacyPolicyText" : { + "type" : "string" + } + }, + "required" : [ "locale" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "appInfo" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appInfos" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "appInfo" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppInfoLocalizationUpdateRequest" : { + "type" : "object", + "title" : "AppInfoLocalizationUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appInfoLocalizations" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "subtitle" : { + "type" : "string" + }, + "privacyPolicyUrl" : { + "type" : "string" + }, + "privacyPolicyText" : { + "type" : "string" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppInfo" : { + "type" : "object", + "title" : "AppInfo", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appInfos" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "appStoreState" : { + "$ref" : "#/components/schemas/AppStoreVersionState" + }, + "appStoreAgeRating" : { + "$ref" : "#/components/schemas/AppStoreAgeRating" + }, + "brazilAgeRating" : { + "$ref" : "#/components/schemas/BrazilAgeRating" + }, + "kidsAgeBand" : { + "$ref" : "#/components/schemas/KidsAgeBand" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "appInfoLocalizations" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appInfoLocalizations" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "primaryCategory" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "primarySubcategoryOne" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "primarySubcategoryTwo" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "secondaryCategory" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "secondarySubcategoryOne" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "secondarySubcategoryTwo" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppInfosResponse" : { + "type" : "object", + "title" : "AppInfosResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppInfo" + } + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/AppInfoLocalization" + }, { + "$ref" : "#/components/schemas/AppCategory" + }, { + "$ref" : "#/components/schemas/AppCategory" + }, { + "$ref" : "#/components/schemas/AppCategory" + }, { + "$ref" : "#/components/schemas/AppCategory" + }, { + "$ref" : "#/components/schemas/AppCategory" + }, { + "$ref" : "#/components/schemas/AppCategory" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppInfoResponse" : { + "type" : "object", + "title" : "AppInfoResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppInfo" + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/AppInfoLocalization" + }, { + "$ref" : "#/components/schemas/AppCategory" + }, { + "$ref" : "#/components/schemas/AppCategory" + }, { + "$ref" : "#/components/schemas/AppCategory" + }, { + "$ref" : "#/components/schemas/AppCategory" + }, { + "$ref" : "#/components/schemas/AppCategory" + }, { + "$ref" : "#/components/schemas/AppCategory" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppInfoUpdateRequest" : { + "type" : "object", + "title" : "AppInfoUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appInfos" ] + }, + "id" : { + "type" : "string" + }, + "relationships" : { + "type" : "object", + "properties" : { + "primaryCategory" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "primarySubcategoryOne" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "primarySubcategoryTwo" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "secondaryCategory" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "secondarySubcategoryOne" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "secondarySubcategoryTwo" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appCategories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppPreOrder" : { + "type" : "object", + "title" : "AppPreOrder", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreOrders" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "preOrderAvailableDate" : { + "type" : "string", + "format" : "date" + }, + "appReleaseDate" : { + "type" : "string", + "format" : "date" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppPreOrderResponse" : { + "type" : "object", + "title" : "AppPreOrderResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppPreOrder" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppPreOrderCreateRequest" : { + "type" : "object", + "title" : "AppPreOrderCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreOrders" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "appReleaseDate" : { + "type" : "string", + "format" : "date" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "app" ] + } + }, + "required" : [ "relationships", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppPreOrderUpdateRequest" : { + "type" : "object", + "title" : "AppPreOrderUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreOrders" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "appReleaseDate" : { + "type" : "string", + "format" : "date" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppPreviewSet" : { + "type" : "object", + "title" : "AppPreviewSet", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreviewSets" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "previewType" : { + "$ref" : "#/components/schemas/PreviewType" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersionLocalization" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionLocalizations" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "appPreviews" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreviews" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppPreviewSetsResponse" : { + "type" : "object", + "title" : "AppPreviewSetsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppPreviewSet" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppPreview" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppPreviewSetResponse" : { + "type" : "object", + "title" : "AppPreviewSetResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppPreviewSet" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppPreview" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppPreviewSetCreateRequest" : { + "type" : "object", + "title" : "AppPreviewSetCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreviewSets" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "previewType" : { + "$ref" : "#/components/schemas/PreviewType" + } + }, + "required" : [ "previewType" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersionLocalization" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionLocalizations" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "appStoreVersionLocalization" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppPreview" : { + "type" : "object", + "title" : "AppPreview", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreviews" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "fileSize" : { + "type" : "integer" + }, + "fileName" : { + "type" : "string" + }, + "sourceFileChecksum" : { + "type" : "string" + }, + "previewFrameTimeCode" : { + "type" : "string" + }, + "mimeType" : { + "type" : "string" + }, + "videoUrl" : { + "type" : "string" + }, + "previewImage" : { + "$ref" : "#/components/schemas/ImageAsset" + }, + "uploadOperations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UploadOperation" + } + }, + "assetDeliveryState" : { + "$ref" : "#/components/schemas/AppMediaAssetState" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "appPreviewSet" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreviewSets" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppPreviewsResponse" : { + "type" : "object", + "title" : "AppPreviewsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppPreview" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppPreviewResponse" : { + "type" : "object", + "title" : "AppPreviewResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppPreview" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppPreviewCreateRequest" : { + "type" : "object", + "title" : "AppPreviewCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreviews" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "fileSize" : { + "type" : "integer" + }, + "fileName" : { + "type" : "string" + }, + "previewFrameTimeCode" : { + "type" : "string" + }, + "mimeType" : { + "type" : "string" + } + }, + "required" : [ "fileName", "fileSize" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "appPreviewSet" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreviewSets" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "appPreviewSet" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppPreviewUpdateRequest" : { + "type" : "object", + "title" : "AppPreviewUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreviews" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "sourceFileChecksum" : { + "type" : "string" + }, + "previewFrameTimeCode" : { + "type" : "string" + }, + "uploaded" : { + "type" : "boolean" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppPricePoint" : { + "type" : "object", + "title" : "AppPricePoint", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPricePoints" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "customerPrice" : { + "type" : "string" + }, + "proceeds" : { + "type" : "string" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "priceTier" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPriceTiers" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "territory" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "territories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppPricePointsResponse" : { + "type" : "object", + "title" : "AppPricePointsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppPricePoint" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Territory" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppPricePointResponse" : { + "type" : "object", + "title" : "AppPricePointResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppPricePoint" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Territory" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppPriceTier" : { + "type" : "object", + "title" : "AppPriceTier", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPriceTiers" ] + }, + "id" : { + "type" : "string" + }, + "relationships" : { + "type" : "object", + "properties" : { + "pricePoints" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPricePoints" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppPriceTiersResponse" : { + "type" : "object", + "title" : "AppPriceTiersResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppPriceTier" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppPricePoint" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppPriceTierResponse" : { + "type" : "object", + "title" : "AppPriceTierResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppPriceTier" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppPricePoint" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppPrice" : { + "type" : "object", + "title" : "AppPrice", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPrices" ] + }, + "id" : { + "type" : "string" + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "priceTier" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPriceTiers" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppPricesResponse" : { + "type" : "object", + "title" : "AppPricesResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppPrice" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppPriceResponse" : { + "type" : "object", + "title" : "AppPriceResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppPrice" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppScreenshotSet" : { + "type" : "object", + "title" : "AppScreenshotSet", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appScreenshotSets" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "screenshotDisplayType" : { + "$ref" : "#/components/schemas/ScreenshotDisplayType" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersionLocalization" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionLocalizations" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "appScreenshots" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appScreenshots" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppScreenshotSetsResponse" : { + "type" : "object", + "title" : "AppScreenshotSetsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppScreenshotSet" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppScreenshot" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppScreenshotSetResponse" : { + "type" : "object", + "title" : "AppScreenshotSetResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppScreenshotSet" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppScreenshot" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppScreenshotSetCreateRequest" : { + "type" : "object", + "title" : "AppScreenshotSetCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appScreenshotSets" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "screenshotDisplayType" : { + "$ref" : "#/components/schemas/ScreenshotDisplayType" + } + }, + "required" : [ "screenshotDisplayType" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersionLocalization" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionLocalizations" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "appStoreVersionLocalization" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppScreenshot" : { + "type" : "object", + "title" : "AppScreenshot", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appScreenshots" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "fileSize" : { + "type" : "integer" + }, + "fileName" : { + "type" : "string" + }, + "sourceFileChecksum" : { + "type" : "string" + }, + "imageAsset" : { + "$ref" : "#/components/schemas/ImageAsset" + }, + "assetToken" : { + "type" : "string" + }, + "assetType" : { + "type" : "string" + }, + "uploadOperations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UploadOperation" + } + }, + "assetDeliveryState" : { + "$ref" : "#/components/schemas/AppMediaAssetState" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "appScreenshotSet" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appScreenshotSets" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppScreenshotsResponse" : { + "type" : "object", + "title" : "AppScreenshotsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppScreenshot" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppScreenshotResponse" : { + "type" : "object", + "title" : "AppScreenshotResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppScreenshot" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppScreenshotCreateRequest" : { + "type" : "object", + "title" : "AppScreenshotCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appScreenshots" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "fileSize" : { + "type" : "integer" + }, + "fileName" : { + "type" : "string" + } + }, + "required" : [ "fileName", "fileSize" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "appScreenshotSet" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appScreenshotSets" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "appScreenshotSet" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppScreenshotUpdateRequest" : { + "type" : "object", + "title" : "AppScreenshotUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appScreenshots" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "sourceFileChecksum" : { + "type" : "string" + }, + "uploaded" : { + "type" : "boolean" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppStoreReviewAttachment" : { + "type" : "object", + "title" : "AppStoreReviewAttachment", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreReviewAttachments" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "fileSize" : { + "type" : "integer" + }, + "fileName" : { + "type" : "string" + }, + "sourceFileChecksum" : { + "type" : "string" + }, + "uploadOperations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UploadOperation" + } + }, + "assetDeliveryState" : { + "$ref" : "#/components/schemas/AppMediaAssetState" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreReviewDetail" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreReviewDetails" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppStoreReviewAttachmentsResponse" : { + "type" : "object", + "title" : "AppStoreReviewAttachmentsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppStoreReviewAttachment" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppStoreReviewAttachmentResponse" : { + "type" : "object", + "title" : "AppStoreReviewAttachmentResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppStoreReviewAttachment" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppStoreReviewAttachmentCreateRequest" : { + "type" : "object", + "title" : "AppStoreReviewAttachmentCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreReviewAttachments" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "fileSize" : { + "type" : "integer" + }, + "fileName" : { + "type" : "string" + } + }, + "required" : [ "fileName", "fileSize" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreReviewDetail" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreReviewDetails" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "appStoreReviewDetail" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppStoreReviewAttachmentUpdateRequest" : { + "type" : "object", + "title" : "AppStoreReviewAttachmentUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreReviewAttachments" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "sourceFileChecksum" : { + "type" : "string" + }, + "uploaded" : { + "type" : "boolean" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppStoreReviewDetail" : { + "type" : "object", + "title" : "AppStoreReviewDetail", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreReviewDetails" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "contactFirstName" : { + "type" : "string" + }, + "contactLastName" : { + "type" : "string" + }, + "contactPhone" : { + "type" : "string" + }, + "contactEmail" : { + "type" : "string" + }, + "demoAccountName" : { + "type" : "string" + }, + "demoAccountPassword" : { + "type" : "string" + }, + "demoAccountRequired" : { + "type" : "boolean" + }, + "notes" : { + "type" : "string" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersion" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "appStoreReviewAttachments" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreReviewAttachments" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppStoreReviewDetailResponse" : { + "type" : "object", + "title" : "AppStoreReviewDetailResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppStoreReviewDetail" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppStoreReviewAttachment" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppStoreReviewDetailCreateRequest" : { + "type" : "object", + "title" : "AppStoreReviewDetailCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreReviewDetails" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "contactFirstName" : { + "type" : "string" + }, + "contactLastName" : { + "type" : "string" + }, + "contactPhone" : { + "type" : "string" + }, + "contactEmail" : { + "type" : "string" + }, + "demoAccountName" : { + "type" : "string" + }, + "demoAccountPassword" : { + "type" : "string" + }, + "demoAccountRequired" : { + "type" : "boolean" + }, + "notes" : { + "type" : "string" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersion" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "appStoreVersion" ] + } + }, + "required" : [ "relationships", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppStoreReviewDetailUpdateRequest" : { + "type" : "object", + "title" : "AppStoreReviewDetailUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreReviewDetails" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "contactFirstName" : { + "type" : "string" + }, + "contactLastName" : { + "type" : "string" + }, + "contactPhone" : { + "type" : "string" + }, + "contactEmail" : { + "type" : "string" + }, + "demoAccountName" : { + "type" : "string" + }, + "demoAccountPassword" : { + "type" : "string" + }, + "demoAccountRequired" : { + "type" : "boolean" + }, + "notes" : { + "type" : "string" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppStoreVersionLocalization" : { + "type" : "object", + "title" : "AppStoreVersionLocalization", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionLocalizations" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "locale" : { + "type" : "string" + }, + "keywords" : { + "type" : "string" + }, + "marketingUrl" : { + "type" : "string", + "format" : "uri" + }, + "promotionalText" : { + "type" : "string" + }, + "supportUrl" : { + "type" : "string", + "format" : "uri" + }, + "whatsNew" : { + "type" : "string" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersion" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "appScreenshotSets" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appScreenshotSets" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "appPreviewSets" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreviewSets" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppStoreVersionLocalizationsResponse" : { + "type" : "object", + "title" : "AppStoreVersionLocalizationsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppStoreVersionLocalization" + } + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/AppScreenshotSet" + }, { + "$ref" : "#/components/schemas/AppPreviewSet" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppStoreVersionLocalizationResponse" : { + "type" : "object", + "title" : "AppStoreVersionLocalizationResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppStoreVersionLocalization" + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/AppScreenshotSet" + }, { + "$ref" : "#/components/schemas/AppPreviewSet" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppStoreVersionLocalizationCreateRequest" : { + "type" : "object", + "title" : "AppStoreVersionLocalizationCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionLocalizations" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "locale" : { + "type" : "string" + }, + "keywords" : { + "type" : "string" + }, + "marketingUrl" : { + "type" : "string", + "format" : "uri" + }, + "promotionalText" : { + "type" : "string" + }, + "supportUrl" : { + "type" : "string", + "format" : "uri" + }, + "whatsNew" : { + "type" : "string" + } + }, + "required" : [ "locale" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersion" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "appStoreVersion" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppStoreVersionLocalizationUpdateRequest" : { + "type" : "object", + "title" : "AppStoreVersionLocalizationUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionLocalizations" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "description" : { + "type" : "string" + }, + "keywords" : { + "type" : "string" + }, + "marketingUrl" : { + "type" : "string", + "format" : "uri" + }, + "promotionalText" : { + "type" : "string" + }, + "supportUrl" : { + "type" : "string", + "format" : "uri" + }, + "whatsNew" : { + "type" : "string" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppStoreVersionPhasedRelease" : { + "type" : "object", + "title" : "AppStoreVersionPhasedRelease", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionPhasedReleases" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "phasedReleaseState" : { + "$ref" : "#/components/schemas/PhasedReleaseState" + }, + "startDate" : { + "type" : "string", + "format" : "date-time" + }, + "totalPauseDuration" : { + "type" : "integer" + }, + "currentDayNumber" : { + "type" : "integer" + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppStoreVersionPhasedReleaseResponse" : { + "type" : "object", + "title" : "AppStoreVersionPhasedReleaseResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppStoreVersionPhasedRelease" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppStoreVersionPhasedReleaseCreateRequest" : { + "type" : "object", + "title" : "AppStoreVersionPhasedReleaseCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionPhasedReleases" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "phasedReleaseState" : { + "$ref" : "#/components/schemas/PhasedReleaseState" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersion" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "appStoreVersion" ] + } + }, + "required" : [ "relationships", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppStoreVersionPhasedReleaseUpdateRequest" : { + "type" : "object", + "title" : "AppStoreVersionPhasedReleaseUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionPhasedReleases" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "phasedReleaseState" : { + "$ref" : "#/components/schemas/PhasedReleaseState" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppStoreVersionSubmission" : { + "type" : "object", + "title" : "AppStoreVersionSubmission", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionSubmissions" ] + }, + "id" : { + "type" : "string" + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersion" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppStoreVersionSubmissionResponse" : { + "type" : "object", + "title" : "AppStoreVersionSubmissionResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppStoreVersionSubmission" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppStoreVersionSubmissionCreateRequest" : { + "type" : "object", + "title" : "AppStoreVersionSubmissionCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionSubmissions" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersion" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "appStoreVersion" ] + } + }, + "required" : [ "relationships", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppStoreVersion" : { + "type" : "object", + "title" : "AppStoreVersion", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "platform" : { + "$ref" : "#/components/schemas/Platform" + }, + "versionString" : { + "type" : "string" + }, + "appStoreState" : { + "$ref" : "#/components/schemas/AppStoreVersionState" + }, + "copyright" : { + "type" : "string" + }, + "releaseType" : { + "type" : "string", + "enum" : [ "MANUAL", "AFTER_APPROVAL", "SCHEDULED" ] + }, + "earliestReleaseDate" : { + "type" : "string", + "format" : "date-time" + }, + "usesIdfa" : { + "type" : "boolean" + }, + "downloadable" : { + "type" : "boolean" + }, + "createdDate" : { + "type" : "string", + "format" : "date-time" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "ageRatingDeclaration" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "ageRatingDeclarations" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "appStoreVersionLocalizations" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionLocalizations" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "build" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "appStoreVersionPhasedRelease" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionPhasedReleases" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "routingAppCoverage" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "routingAppCoverages" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "appStoreReviewDetail" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreReviewDetails" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "appStoreVersionSubmission" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersionSubmissions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "idfaDeclaration" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "idfaDeclarations" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppStoreVersionsResponse" : { + "type" : "object", + "title" : "AppStoreVersionsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppStoreVersion" + } + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/AgeRatingDeclaration" + }, { + "$ref" : "#/components/schemas/AppStoreVersionLocalization" + }, { + "$ref" : "#/components/schemas/Build" + }, { + "$ref" : "#/components/schemas/AppStoreVersionPhasedRelease" + }, { + "$ref" : "#/components/schemas/RoutingAppCoverage" + }, { + "$ref" : "#/components/schemas/AppStoreReviewDetail" + }, { + "$ref" : "#/components/schemas/AppStoreVersionSubmission" + }, { + "$ref" : "#/components/schemas/IdfaDeclaration" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppStoreVersionResponse" : { + "type" : "object", + "title" : "AppStoreVersionResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AppStoreVersion" + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/AgeRatingDeclaration" + }, { + "$ref" : "#/components/schemas/AppStoreVersionLocalization" + }, { + "$ref" : "#/components/schemas/Build" + }, { + "$ref" : "#/components/schemas/AppStoreVersionPhasedRelease" + }, { + "$ref" : "#/components/schemas/RoutingAppCoverage" + }, { + "$ref" : "#/components/schemas/AppStoreReviewDetail" + }, { + "$ref" : "#/components/schemas/AppStoreVersionSubmission" + }, { + "$ref" : "#/components/schemas/IdfaDeclaration" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppStoreVersionCreateRequest" : { + "type" : "object", + "title" : "AppStoreVersionCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "platform" : { + "$ref" : "#/components/schemas/Platform" + }, + "versionString" : { + "type" : "string" + }, + "copyright" : { + "type" : "string" + }, + "releaseType" : { + "type" : "string", + "enum" : [ "MANUAL", "AFTER_APPROVAL", "SCHEDULED" ] + }, + "earliestReleaseDate" : { + "type" : "string", + "format" : "date-time" + }, + "usesIdfa" : { + "type" : "boolean" + } + }, + "required" : [ "versionString", "platform" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "build" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "required" : [ "app" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppStoreVersionUpdateRequest" : { + "type" : "object", + "title" : "AppStoreVersionUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "versionString" : { + "type" : "string" + }, + "copyright" : { + "type" : "string" + }, + "releaseType" : { + "type" : "string", + "enum" : [ "MANUAL", "AFTER_APPROVAL", "SCHEDULED" ] + }, + "earliestReleaseDate" : { + "type" : "string", + "format" : "date-time" + }, + "usesIdfa" : { + "type" : "boolean" + }, + "downloadable" : { + "type" : "boolean" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "build" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "App" : { + "type" : "object", + "title" : "App", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "bundleId" : { + "type" : "string" + }, + "sku" : { + "type" : "string" + }, + "primaryLocale" : { + "type" : "string" + }, + "isOrEverWasMadeForKids" : { + "type" : "boolean" + }, + "availableInNewTerritories" : { + "type" : "boolean" + }, + "contentRightsDeclaration" : { + "type" : "string", + "enum" : [ "DOES_NOT_USE_THIRD_PARTY_CONTENT", "USES_THIRD_PARTY_CONTENT" ] + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "betaGroups" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaGroups" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "appStoreVersions" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "preReleaseVersions" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "preReleaseVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "betaAppLocalizations" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaAppLocalizations" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "builds" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "betaLicenseAgreement" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaLicenseAgreements" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "betaAppReviewDetail" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaAppReviewDetails" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "appInfos" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appInfos" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "endUserLicenseAgreement" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "endUserLicenseAgreements" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "preOrder" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreOrders" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "prices" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPrices" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "availableTerritories" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "territories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "inAppPurchases" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "inAppPurchases" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "gameCenterEnabledVersions" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "gameCenterEnabledVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "AppsResponse" : { + "type" : "object", + "title" : "AppsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/App" + } + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/BetaGroup" + }, { + "$ref" : "#/components/schemas/AppStoreVersion" + }, { + "$ref" : "#/components/schemas/PrereleaseVersion" + }, { + "$ref" : "#/components/schemas/BetaAppLocalization" + }, { + "$ref" : "#/components/schemas/Build" + }, { + "$ref" : "#/components/schemas/BetaLicenseAgreement" + }, { + "$ref" : "#/components/schemas/BetaAppReviewDetail" + }, { + "$ref" : "#/components/schemas/AppInfo" + }, { + "$ref" : "#/components/schemas/EndUserLicenseAgreement" + }, { + "$ref" : "#/components/schemas/AppPreOrder" + }, { + "$ref" : "#/components/schemas/AppPrice" + }, { + "$ref" : "#/components/schemas/Territory" + }, { + "$ref" : "#/components/schemas/InAppPurchase" + }, { + "$ref" : "#/components/schemas/GameCenterEnabledVersion" + }, { + "$ref" : "#/components/schemas/PerfPowerMetric" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppResponse" : { + "type" : "object", + "title" : "AppResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/App" + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/BetaGroup" + }, { + "$ref" : "#/components/schemas/AppStoreVersion" + }, { + "$ref" : "#/components/schemas/PrereleaseVersion" + }, { + "$ref" : "#/components/schemas/BetaAppLocalization" + }, { + "$ref" : "#/components/schemas/Build" + }, { + "$ref" : "#/components/schemas/BetaLicenseAgreement" + }, { + "$ref" : "#/components/schemas/BetaAppReviewDetail" + }, { + "$ref" : "#/components/schemas/AppInfo" + }, { + "$ref" : "#/components/schemas/EndUserLicenseAgreement" + }, { + "$ref" : "#/components/schemas/AppPreOrder" + }, { + "$ref" : "#/components/schemas/AppPrice" + }, { + "$ref" : "#/components/schemas/Territory" + }, { + "$ref" : "#/components/schemas/InAppPurchase" + }, { + "$ref" : "#/components/schemas/GameCenterEnabledVersion" + }, { + "$ref" : "#/components/schemas/PerfPowerMetric" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppUpdateRequest" : { + "type" : "object", + "title" : "AppUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "bundleId" : { + "type" : "string" + }, + "primaryLocale" : { + "type" : "string" + }, + "availableInNewTerritories" : { + "type" : "boolean" + }, + "contentRightsDeclaration" : { + "type" : "string", + "enum" : [ "DOES_NOT_USE_THIRD_PARTY_CONTENT", "USES_THIRD_PARTY_CONTENT" ] + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "prices" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPrices" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "availableTerritories" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "territories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "BetaAppLocalization" : { + "type" : "object", + "title" : "BetaAppLocalization", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaAppLocalizations" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "feedbackEmail" : { + "type" : "string" + }, + "marketingUrl" : { + "type" : "string" + }, + "privacyPolicyUrl" : { + "type" : "string" + }, + "tvOsPrivacyPolicy" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "locale" : { + "type" : "string" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "BetaAppLocalizationsResponse" : { + "type" : "object", + "title" : "BetaAppLocalizationsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BetaAppLocalization" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/App" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BetaAppLocalizationResponse" : { + "type" : "object", + "title" : "BetaAppLocalizationResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/BetaAppLocalization" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/App" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "BetaAppLocalizationCreateRequest" : { + "type" : "object", + "title" : "BetaAppLocalizationCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaAppLocalizations" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "feedbackEmail" : { + "type" : "string" + }, + "marketingUrl" : { + "type" : "string" + }, + "privacyPolicyUrl" : { + "type" : "string" + }, + "tvOsPrivacyPolicy" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "locale" : { + "type" : "string" + } + }, + "required" : [ "locale" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "app" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "BetaAppLocalizationUpdateRequest" : { + "type" : "object", + "title" : "BetaAppLocalizationUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaAppLocalizations" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "feedbackEmail" : { + "type" : "string" + }, + "marketingUrl" : { + "type" : "string" + }, + "privacyPolicyUrl" : { + "type" : "string" + }, + "tvOsPrivacyPolicy" : { + "type" : "string" + }, + "description" : { + "type" : "string" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "BetaAppReviewDetail" : { + "type" : "object", + "title" : "BetaAppReviewDetail", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaAppReviewDetails" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "contactFirstName" : { + "type" : "string" + }, + "contactLastName" : { + "type" : "string" + }, + "contactPhone" : { + "type" : "string" + }, + "contactEmail" : { + "type" : "string" + }, + "demoAccountName" : { + "type" : "string" + }, + "demoAccountPassword" : { + "type" : "string" + }, + "demoAccountRequired" : { + "type" : "boolean" + }, + "notes" : { + "type" : "string" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "BetaAppReviewDetailsResponse" : { + "type" : "object", + "title" : "BetaAppReviewDetailsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BetaAppReviewDetail" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/App" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BetaAppReviewDetailResponse" : { + "type" : "object", + "title" : "BetaAppReviewDetailResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/BetaAppReviewDetail" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/App" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "BetaAppReviewDetailUpdateRequest" : { + "type" : "object", + "title" : "BetaAppReviewDetailUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaAppReviewDetails" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "contactFirstName" : { + "type" : "string" + }, + "contactLastName" : { + "type" : "string" + }, + "contactPhone" : { + "type" : "string" + }, + "contactEmail" : { + "type" : "string" + }, + "demoAccountName" : { + "type" : "string" + }, + "demoAccountPassword" : { + "type" : "string" + }, + "demoAccountRequired" : { + "type" : "boolean" + }, + "notes" : { + "type" : "string" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "BetaAppReviewSubmission" : { + "type" : "object", + "title" : "BetaAppReviewSubmission", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaAppReviewSubmissions" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "betaReviewState" : { + "$ref" : "#/components/schemas/BetaReviewState" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "build" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "BetaAppReviewSubmissionsResponse" : { + "type" : "object", + "title" : "BetaAppReviewSubmissionsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BetaAppReviewSubmission" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Build" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BetaAppReviewSubmissionResponse" : { + "type" : "object", + "title" : "BetaAppReviewSubmissionResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/BetaAppReviewSubmission" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Build" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "BetaAppReviewSubmissionCreateRequest" : { + "type" : "object", + "title" : "BetaAppReviewSubmissionCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaAppReviewSubmissions" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "build" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "build" ] + } + }, + "required" : [ "relationships", "type" ] + } + }, + "required" : [ "data" ] + }, + "BetaBuildLocalization" : { + "type" : "object", + "title" : "BetaBuildLocalization", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaBuildLocalizations" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "whatsNew" : { + "type" : "string" + }, + "locale" : { + "type" : "string" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "build" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "BetaBuildLocalizationsResponse" : { + "type" : "object", + "title" : "BetaBuildLocalizationsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BetaBuildLocalization" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Build" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BetaBuildLocalizationResponse" : { + "type" : "object", + "title" : "BetaBuildLocalizationResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/BetaBuildLocalization" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Build" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "BetaBuildLocalizationCreateRequest" : { + "type" : "object", + "title" : "BetaBuildLocalizationCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaBuildLocalizations" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "whatsNew" : { + "type" : "string" + }, + "locale" : { + "type" : "string" + } + }, + "required" : [ "locale" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "build" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "build" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "BetaBuildLocalizationUpdateRequest" : { + "type" : "object", + "title" : "BetaBuildLocalizationUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaBuildLocalizations" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "whatsNew" : { + "type" : "string" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "BetaGroup" : { + "type" : "object", + "title" : "BetaGroup", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaGroups" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "createdDate" : { + "type" : "string", + "format" : "date-time" + }, + "isInternalGroup" : { + "type" : "boolean" + }, + "publicLinkEnabled" : { + "type" : "boolean" + }, + "publicLinkId" : { + "type" : "string" + }, + "publicLinkLimitEnabled" : { + "type" : "boolean" + }, + "publicLinkLimit" : { + "type" : "integer" + }, + "publicLink" : { + "type" : "string" + }, + "feedbackEnabled" : { + "type" : "boolean" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "builds" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "betaTesters" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaTesters" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "BetaGroupsResponse" : { + "type" : "object", + "title" : "BetaGroupsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BetaGroup" + } + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/App" + }, { + "$ref" : "#/components/schemas/Build" + }, { + "$ref" : "#/components/schemas/BetaTester" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BetaGroupResponse" : { + "type" : "object", + "title" : "BetaGroupResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/BetaGroup" + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/App" + }, { + "$ref" : "#/components/schemas/Build" + }, { + "$ref" : "#/components/schemas/BetaTester" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "BetaGroupCreateRequest" : { + "type" : "object", + "title" : "BetaGroupCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaGroups" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "publicLinkEnabled" : { + "type" : "boolean" + }, + "publicLinkLimitEnabled" : { + "type" : "boolean" + }, + "publicLinkLimit" : { + "type" : "integer" + }, + "feedbackEnabled" : { + "type" : "boolean" + } + }, + "required" : [ "name" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "builds" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "betaTesters" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaTesters" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "required" : [ "app" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "BetaGroupUpdateRequest" : { + "type" : "object", + "title" : "BetaGroupUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaGroups" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "publicLinkEnabled" : { + "type" : "boolean" + }, + "publicLinkLimitEnabled" : { + "type" : "boolean" + }, + "publicLinkLimit" : { + "type" : "integer" + }, + "feedbackEnabled" : { + "type" : "boolean" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "BetaLicenseAgreement" : { + "type" : "object", + "title" : "BetaLicenseAgreement", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaLicenseAgreements" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "agreementText" : { + "type" : "string" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "BetaLicenseAgreementsResponse" : { + "type" : "object", + "title" : "BetaLicenseAgreementsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BetaLicenseAgreement" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/App" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BetaLicenseAgreementResponse" : { + "type" : "object", + "title" : "BetaLicenseAgreementResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/BetaLicenseAgreement" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/App" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "BetaLicenseAgreementUpdateRequest" : { + "type" : "object", + "title" : "BetaLicenseAgreementUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaLicenseAgreements" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "agreementText" : { + "type" : "string" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "BetaTesterInvitation" : { + "type" : "object", + "title" : "BetaTesterInvitation", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaTesterInvitations" ] + }, + "id" : { + "type" : "string" + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "BetaTesterInvitationResponse" : { + "type" : "object", + "title" : "BetaTesterInvitationResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/BetaTesterInvitation" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "BetaTesterInvitationCreateRequest" : { + "type" : "object", + "title" : "BetaTesterInvitationCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaTesterInvitations" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "betaTester" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaTesters" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "app" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "app", "betaTester" ] + } + }, + "required" : [ "relationships", "type" ] + } + }, + "required" : [ "data" ] + }, + "BetaTester" : { + "type" : "object", + "title" : "BetaTester", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaTesters" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string", + "format" : "email" + }, + "inviteType" : { + "$ref" : "#/components/schemas/BetaInviteType" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "apps" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "betaGroups" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaGroups" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "builds" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "BetaTestersResponse" : { + "type" : "object", + "title" : "BetaTestersResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BetaTester" + } + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/App" + }, { + "$ref" : "#/components/schemas/BetaGroup" + }, { + "$ref" : "#/components/schemas/Build" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BetaTesterResponse" : { + "type" : "object", + "title" : "BetaTesterResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/BetaTester" + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/App" + }, { + "$ref" : "#/components/schemas/BetaGroup" + }, { + "$ref" : "#/components/schemas/Build" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "BetaTesterCreateRequest" : { + "type" : "object", + "title" : "BetaTesterCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaTesters" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string", + "format" : "email" + } + }, + "required" : [ "email" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "betaGroups" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaGroups" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "builds" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + } + }, + "required" : [ "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "BuildBetaDetail" : { + "type" : "object", + "title" : "BuildBetaDetail", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "buildBetaDetails" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "autoNotifyEnabled" : { + "type" : "boolean" + }, + "internalBuildState" : { + "$ref" : "#/components/schemas/InternalBetaState" + }, + "externalBuildState" : { + "$ref" : "#/components/schemas/ExternalBetaState" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "build" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "BuildBetaDetailsResponse" : { + "type" : "object", + "title" : "BuildBetaDetailsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BuildBetaDetail" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Build" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BuildBetaDetailResponse" : { + "type" : "object", + "title" : "BuildBetaDetailResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/BuildBetaDetail" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Build" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "BuildBetaDetailUpdateRequest" : { + "type" : "object", + "title" : "BuildBetaDetailUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "buildBetaDetails" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "autoNotifyEnabled" : { + "type" : "boolean" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "BuildBetaNotification" : { + "type" : "object", + "title" : "BuildBetaNotification", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "buildBetaNotifications" ] + }, + "id" : { + "type" : "string" + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "BuildBetaNotificationResponse" : { + "type" : "object", + "title" : "BuildBetaNotificationResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/BuildBetaNotification" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "BuildBetaNotificationCreateRequest" : { + "type" : "object", + "title" : "BuildBetaNotificationCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "buildBetaNotifications" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "build" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "build" ] + } + }, + "required" : [ "relationships", "type" ] + } + }, + "required" : [ "data" ] + }, + "BuildIcon" : { + "type" : "object", + "title" : "BuildIcon", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "buildIcons" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "iconAsset" : { + "$ref" : "#/components/schemas/ImageAsset" + }, + "iconType" : { + "$ref" : "#/components/schemas/IconAssetType" + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "BuildIconsResponse" : { + "type" : "object", + "title" : "BuildIconsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BuildIcon" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "Build" : { + "type" : "object", + "title" : "Build", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "version" : { + "type" : "string" + }, + "uploadedDate" : { + "type" : "string", + "format" : "date-time" + }, + "expirationDate" : { + "type" : "string", + "format" : "date-time" + }, + "expired" : { + "type" : "boolean" + }, + "minOsVersion" : { + "type" : "string" + }, + "iconAssetToken" : { + "$ref" : "#/components/schemas/ImageAsset" + }, + "processingState" : { + "type" : "string", + "enum" : [ "PROCESSING", "FAILED", "INVALID", "VALID" ] + }, + "usesNonExemptEncryption" : { + "type" : "boolean" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "preReleaseVersion" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "preReleaseVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "individualTesters" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaTesters" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "betaBuildLocalizations" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaBuildLocalizations" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "appEncryptionDeclaration" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appEncryptionDeclarations" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "betaAppReviewSubmission" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaAppReviewSubmissions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "app" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "buildBetaDetail" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "buildBetaDetails" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "appStoreVersion" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "icons" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "buildIcons" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "BuildsResponse" : { + "type" : "object", + "title" : "BuildsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Build" + } + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/PrereleaseVersion" + }, { + "$ref" : "#/components/schemas/BetaTester" + }, { + "$ref" : "#/components/schemas/BetaBuildLocalization" + }, { + "$ref" : "#/components/schemas/AppEncryptionDeclaration" + }, { + "$ref" : "#/components/schemas/BetaAppReviewSubmission" + }, { + "$ref" : "#/components/schemas/App" + }, { + "$ref" : "#/components/schemas/BuildBetaDetail" + }, { + "$ref" : "#/components/schemas/AppStoreVersion" + }, { + "$ref" : "#/components/schemas/BuildIcon" + }, { + "$ref" : "#/components/schemas/PerfPowerMetric" + }, { + "$ref" : "#/components/schemas/DiagnosticSignature" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BuildResponse" : { + "type" : "object", + "title" : "BuildResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/Build" + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/PrereleaseVersion" + }, { + "$ref" : "#/components/schemas/BetaTester" + }, { + "$ref" : "#/components/schemas/BetaBuildLocalization" + }, { + "$ref" : "#/components/schemas/AppEncryptionDeclaration" + }, { + "$ref" : "#/components/schemas/BetaAppReviewSubmission" + }, { + "$ref" : "#/components/schemas/App" + }, { + "$ref" : "#/components/schemas/BuildBetaDetail" + }, { + "$ref" : "#/components/schemas/AppStoreVersion" + }, { + "$ref" : "#/components/schemas/BuildIcon" + }, { + "$ref" : "#/components/schemas/PerfPowerMetric" + }, { + "$ref" : "#/components/schemas/DiagnosticSignature" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "BuildUpdateRequest" : { + "type" : "object", + "title" : "BuildUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "expired" : { + "type" : "boolean" + }, + "usesNonExemptEncryption" : { + "type" : "boolean" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "appEncryptionDeclaration" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appEncryptionDeclarations" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "BundleIdCapability" : { + "type" : "object", + "title" : "BundleIdCapability", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "bundleIdCapabilities" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "capabilityType" : { + "$ref" : "#/components/schemas/CapabilityType" + }, + "settings" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CapabilitySetting" + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "BundleIdCapabilitiesResponse" : { + "type" : "object", + "title" : "BundleIdCapabilitiesResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BundleIdCapability" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BundleIdCapabilityResponse" : { + "type" : "object", + "title" : "BundleIdCapabilityResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/BundleIdCapability" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "BundleIdCapabilityCreateRequest" : { + "type" : "object", + "title" : "BundleIdCapabilityCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "bundleIdCapabilities" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "capabilityType" : { + "$ref" : "#/components/schemas/CapabilityType" + }, + "settings" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CapabilitySetting" + } + } + }, + "required" : [ "capabilityType" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "bundleId" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "bundleIds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "bundleId" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "BundleIdCapabilityUpdateRequest" : { + "type" : "object", + "title" : "BundleIdCapabilityUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "bundleIdCapabilities" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "capabilityType" : { + "$ref" : "#/components/schemas/CapabilityType" + }, + "settings" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CapabilitySetting" + } + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "BundleId" : { + "type" : "object", + "title" : "BundleId", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "bundleIds" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "platform" : { + "$ref" : "#/components/schemas/BundleIdPlatform" + }, + "identifier" : { + "type" : "string" + }, + "seedId" : { + "type" : "string" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "profiles" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "profiles" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "bundleIdCapabilities" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "bundleIdCapabilities" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "app" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "BundleIdsResponse" : { + "type" : "object", + "title" : "BundleIdsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BundleId" + } + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/Profile" + }, { + "$ref" : "#/components/schemas/BundleIdCapability" + }, { + "$ref" : "#/components/schemas/App" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BundleIdResponse" : { + "type" : "object", + "title" : "BundleIdResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/BundleId" + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/Profile" + }, { + "$ref" : "#/components/schemas/BundleIdCapability" + }, { + "$ref" : "#/components/schemas/App" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "BundleIdCreateRequest" : { + "type" : "object", + "title" : "BundleIdCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "bundleIds" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "platform" : { + "$ref" : "#/components/schemas/BundleIdPlatform" + }, + "identifier" : { + "type" : "string" + }, + "seedId" : { + "type" : "string" + } + }, + "required" : [ "identifier", "name", "platform" ] + } + }, + "required" : [ "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "BundleIdUpdateRequest" : { + "type" : "object", + "title" : "BundleIdUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "bundleIds" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "Certificate" : { + "type" : "object", + "title" : "Certificate", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "certificates" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "certificateType" : { + "$ref" : "#/components/schemas/CertificateType" + }, + "displayName" : { + "type" : "string" + }, + "serialNumber" : { + "type" : "string" + }, + "platform" : { + "$ref" : "#/components/schemas/BundleIdPlatform" + }, + "expirationDate" : { + "type" : "string", + "format" : "date-time" + }, + "certificateContent" : { + "type" : "string" + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "CertificatesResponse" : { + "type" : "object", + "title" : "CertificatesResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Certificate" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "CertificateResponse" : { + "type" : "object", + "title" : "CertificateResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/Certificate" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "CertificateCreateRequest" : { + "type" : "object", + "title" : "CertificateCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "certificates" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "csrContent" : { + "type" : "string" + }, + "certificateType" : { + "$ref" : "#/components/schemas/CertificateType" + } + }, + "required" : [ "csrContent", "certificateType" ] + } + }, + "required" : [ "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "Device" : { + "type" : "object", + "title" : "Device", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "devices" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "platform" : { + "$ref" : "#/components/schemas/BundleIdPlatform" + }, + "udid" : { + "type" : "string" + }, + "deviceClass" : { + "type" : "string", + "enum" : [ "APPLE_WATCH", "IPAD", "IPHONE", "IPOD", "APPLE_TV", "MAC" ] + }, + "status" : { + "type" : "string", + "enum" : [ "ENABLED", "DISABLED" ] + }, + "model" : { + "type" : "string" + }, + "addedDate" : { + "type" : "string", + "format" : "date-time" + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "DevicesResponse" : { + "type" : "object", + "title" : "DevicesResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Device" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "DeviceResponse" : { + "type" : "object", + "title" : "DeviceResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/Device" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "DeviceCreateRequest" : { + "type" : "object", + "title" : "DeviceCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "devices" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "platform" : { + "$ref" : "#/components/schemas/BundleIdPlatform" + }, + "udid" : { + "type" : "string" + } + }, + "required" : [ "name", "udid", "platform" ] + } + }, + "required" : [ "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "DeviceUpdateRequest" : { + "type" : "object", + "title" : "DeviceUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "devices" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "status" : { + "type" : "string", + "enum" : [ "ENABLED", "DISABLED" ] + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "DiagnosticLog" : { + "type" : "object", + "title" : "DiagnosticLog", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "diagnosticLogs" ] + }, + "id" : { + "type" : "string" + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "DiagnosticLogsResponse" : { + "type" : "object", + "title" : "DiagnosticLogsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/DiagnosticLog" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "DiagnosticSignature" : { + "type" : "object", + "title" : "DiagnosticSignature", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "diagnosticSignatures" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "diagnosticType" : { + "type" : "string", + "enum" : [ "DISK_WRITES" ] + }, + "signature" : { + "type" : "string" + }, + "weight" : { + "type" : "number" + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "DiagnosticSignaturesResponse" : { + "type" : "object", + "title" : "DiagnosticSignaturesResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/DiagnosticSignature" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/DiagnosticLog" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "EndUserLicenseAgreement" : { + "type" : "object", + "title" : "EndUserLicenseAgreement", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "endUserLicenseAgreements" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "agreementText" : { + "type" : "string" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "territories" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "territories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "EndUserLicenseAgreementResponse" : { + "type" : "object", + "title" : "EndUserLicenseAgreementResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/EndUserLicenseAgreement" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Territory" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "EndUserLicenseAgreementCreateRequest" : { + "type" : "object", + "title" : "EndUserLicenseAgreementCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "endUserLicenseAgreements" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "agreementText" : { + "type" : "string" + } + }, + "required" : [ "agreementText" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "app" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "territories" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "territories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "app", "territories" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "EndUserLicenseAgreementUpdateRequest" : { + "type" : "object", + "title" : "EndUserLicenseAgreementUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "endUserLicenseAgreements" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "agreementText" : { + "type" : "string" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "territories" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "territories" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "GameCenterEnabledVersion" : { + "type" : "object", + "title" : "GameCenterEnabledVersion", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "gameCenterEnabledVersions" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "platform" : { + "$ref" : "#/components/schemas/Platform" + }, + "versionString" : { + "type" : "string" + }, + "iconAsset" : { + "$ref" : "#/components/schemas/ImageAsset" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "compatibleVersions" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "gameCenterEnabledVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "app" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "GameCenterEnabledVersionsResponse" : { + "type" : "object", + "title" : "GameCenterEnabledVersionsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/GameCenterEnabledVersion" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/GameCenterEnabledVersion" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "IdfaDeclaration" : { + "type" : "object", + "title" : "IdfaDeclaration", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "idfaDeclarations" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "servesAds" : { + "type" : "boolean" + }, + "attributesAppInstallationToPreviousAd" : { + "type" : "boolean" + }, + "attributesActionWithPreviousAd" : { + "type" : "boolean" + }, + "honorsLimitedAdTracking" : { + "type" : "boolean" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersion" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "IdfaDeclarationResponse" : { + "type" : "object", + "title" : "IdfaDeclarationResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/IdfaDeclaration" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "IdfaDeclarationCreateRequest" : { + "type" : "object", + "title" : "IdfaDeclarationCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "idfaDeclarations" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "servesAds" : { + "type" : "boolean" + }, + "attributesAppInstallationToPreviousAd" : { + "type" : "boolean" + }, + "attributesActionWithPreviousAd" : { + "type" : "boolean" + }, + "honorsLimitedAdTracking" : { + "type" : "boolean" + } + }, + "required" : [ "attributesAppInstallationToPreviousAd", "servesAds", "attributesActionWithPreviousAd", "honorsLimitedAdTracking" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersion" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "appStoreVersion" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "IdfaDeclarationUpdateRequest" : { + "type" : "object", + "title" : "IdfaDeclarationUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "idfaDeclarations" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "servesAds" : { + "type" : "boolean" + }, + "attributesAppInstallationToPreviousAd" : { + "type" : "boolean" + }, + "attributesActionWithPreviousAd" : { + "type" : "boolean" + }, + "honorsLimitedAdTracking" : { + "type" : "boolean" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "InAppPurchase" : { + "type" : "object", + "title" : "InAppPurchase", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "inAppPurchases" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "referenceName" : { + "type" : "string" + }, + "productId" : { + "type" : "string" + }, + "inAppPurchaseType" : { + "type" : "string", + "enum" : [ "AUTOMATICALLY_RENEWABLE_SUBSCRIPTION", "NON_CONSUMABLE", "CONSUMABLE", "NON_RENEWING_SUBSCRIPTION", "FREE_SUBSCRIPTION" ] + }, + "state" : { + "type" : "string", + "enum" : [ "CREATED", "DEVELOPER_SIGNED_OFF", "DEVELOPER_ACTION_NEEDED", "DELETION_IN_PROGRESS", "APPROVED", "DELETED", "REMOVED_FROM_SALE", "DEVELOPER_REMOVED_FROM_SALE", "WAITING_FOR_UPLOAD", "PROCESSING_CONTENT", "REPLACED", "REJECTED", "WAITING_FOR_SCREENSHOT", "PREPARE_FOR_SUBMISSION", "MISSING_METADATA", "READY_TO_SUBMIT", "WAITING_FOR_REVIEW", "IN_REVIEW", "PENDING_DEVELOPER_RELEASE" ] + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "apps" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "InAppPurchasesResponse" : { + "type" : "object", + "title" : "InAppPurchasesResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/InAppPurchase" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "InAppPurchaseResponse" : { + "type" : "object", + "title" : "InAppPurchaseResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/InAppPurchase" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "PerfPowerMetric" : { + "type" : "object", + "title" : "PerfPowerMetric", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "perfPowerMetrics" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "platform" : { + "type" : "string", + "enum" : [ "IOS" ] + }, + "metricType" : { + "type" : "string", + "enum" : [ "DISK", "HANG", "BATTERY", "LAUNCH", "MEMORY", "ANIMATION" ] + }, + "deviceType" : { + "type" : "string" + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "PerfPowerMetricsResponse" : { + "type" : "object", + "title" : "PerfPowerMetricsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PerfPowerMetric" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "PrereleaseVersion" : { + "type" : "object", + "title" : "PrereleaseVersion", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "preReleaseVersions" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "version" : { + "type" : "string" + }, + "platform" : { + "$ref" : "#/components/schemas/Platform" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "builds" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "app" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "PreReleaseVersionsResponse" : { + "type" : "object", + "title" : "PreReleaseVersionsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PrereleaseVersion" + } + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/Build" + }, { + "$ref" : "#/components/schemas/App" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "PrereleaseVersionResponse" : { + "type" : "object", + "title" : "PrereleaseVersionResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/PrereleaseVersion" + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/Build" + }, { + "$ref" : "#/components/schemas/App" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "Profile" : { + "type" : "object", + "title" : "Profile", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "profiles" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "platform" : { + "$ref" : "#/components/schemas/BundleIdPlatform" + }, + "profileType" : { + "type" : "string", + "enum" : [ "IOS_APP_DEVELOPMENT", "IOS_APP_STORE", "IOS_APP_ADHOC", "IOS_APP_INHOUSE", "MAC_APP_DEVELOPMENT", "MAC_APP_STORE", "MAC_APP_DIRECT", "TVOS_APP_DEVELOPMENT", "TVOS_APP_STORE", "TVOS_APP_ADHOC", "TVOS_APP_INHOUSE", "MAC_CATALYST_APP_DEVELOPMENT", "MAC_CATALYST_APP_STORE", "MAC_CATALYST_APP_DIRECT" ] + }, + "profileState" : { + "type" : "string", + "enum" : [ "ACTIVE", "INVALID" ] + }, + "profileContent" : { + "type" : "string" + }, + "uuid" : { + "type" : "string" + }, + "createdDate" : { + "type" : "string", + "format" : "date-time" + }, + "expirationDate" : { + "type" : "string", + "format" : "date-time" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "bundleId" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "bundleIds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "devices" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "devices" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "certificates" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "certificates" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "ProfilesResponse" : { + "type" : "object", + "title" : "ProfilesResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Profile" + } + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/BundleId" + }, { + "$ref" : "#/components/schemas/Device" + }, { + "$ref" : "#/components/schemas/Certificate" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "ProfileResponse" : { + "type" : "object", + "title" : "ProfileResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/Profile" + }, + "included" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/components/schemas/BundleId" + }, { + "$ref" : "#/components/schemas/Device" + }, { + "$ref" : "#/components/schemas/Certificate" + } ] + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "ProfileCreateRequest" : { + "type" : "object", + "title" : "ProfileCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "profiles" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "profileType" : { + "type" : "string", + "enum" : [ "IOS_APP_DEVELOPMENT", "IOS_APP_STORE", "IOS_APP_ADHOC", "IOS_APP_INHOUSE", "MAC_APP_DEVELOPMENT", "MAC_APP_STORE", "MAC_APP_DIRECT", "TVOS_APP_DEVELOPMENT", "TVOS_APP_STORE", "TVOS_APP_ADHOC", "TVOS_APP_INHOUSE", "MAC_CATALYST_APP_DEVELOPMENT", "MAC_CATALYST_APP_STORE", "MAC_CATALYST_APP_DIRECT" ] + } + }, + "required" : [ "profileType", "name" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "bundleId" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "bundleIds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "devices" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "devices" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + }, + "certificates" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "certificates" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "certificates", "bundleId" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "RoutingAppCoverage" : { + "type" : "object", + "title" : "RoutingAppCoverage", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "routingAppCoverages" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "fileSize" : { + "type" : "integer" + }, + "fileName" : { + "type" : "string" + }, + "sourceFileChecksum" : { + "type" : "string" + }, + "uploadOperations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UploadOperation" + } + }, + "assetDeliveryState" : { + "$ref" : "#/components/schemas/AppMediaAssetState" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersion" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "RoutingAppCoverageResponse" : { + "type" : "object", + "title" : "RoutingAppCoverageResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/RoutingAppCoverage" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "RoutingAppCoverageCreateRequest" : { + "type" : "object", + "title" : "RoutingAppCoverageCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "routingAppCoverages" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "fileSize" : { + "type" : "integer" + }, + "fileName" : { + "type" : "string" + } + }, + "required" : [ "fileName", "fileSize" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "appStoreVersion" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appStoreVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + } + }, + "required" : [ "appStoreVersion" ] + } + }, + "required" : [ "relationships", "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "RoutingAppCoverageUpdateRequest" : { + "type" : "object", + "title" : "RoutingAppCoverageUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "routingAppCoverages" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "sourceFileChecksum" : { + "type" : "string" + }, + "uploaded" : { + "type" : "boolean" + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "Territory" : { + "type" : "object", + "title" : "Territory", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "territories" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "currency" : { + "type" : "string" + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "TerritoriesResponse" : { + "type" : "object", + "title" : "TerritoriesResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Territory" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "TerritoryResponse" : { + "type" : "object", + "title" : "TerritoryResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/Territory" + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "UserInvitation" : { + "type" : "object", + "title" : "UserInvitation", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "userInvitations" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "email" : { + "type" : "string", + "format" : "email" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "expirationDate" : { + "type" : "string", + "format" : "date-time" + }, + "roles" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UserRole" + } + }, + "allAppsVisible" : { + "type" : "boolean" + }, + "provisioningAllowed" : { + "type" : "boolean" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "visibleApps" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "UserInvitationsResponse" : { + "type" : "object", + "title" : "UserInvitationsResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UserInvitation" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/App" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "UserInvitationResponse" : { + "type" : "object", + "title" : "UserInvitationResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/UserInvitation" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/App" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "UserInvitationCreateRequest" : { + "type" : "object", + "title" : "UserInvitationCreateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "userInvitations" ] + }, + "attributes" : { + "type" : "object", + "properties" : { + "email" : { + "type" : "string", + "format" : "email" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "roles" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UserRole" + } + }, + "allAppsVisible" : { + "type" : "boolean" + }, + "provisioningAllowed" : { + "type" : "boolean" + } + }, + "required" : [ "firstName", "lastName", "roles", "email" ] + }, + "relationships" : { + "type" : "object", + "properties" : { + "visibleApps" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + } + }, + "required" : [ "attributes", "type" ] + } + }, + "required" : [ "data" ] + }, + "User" : { + "type" : "object", + "title" : "User", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "users" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "roles" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UserRole" + } + }, + "allAppsVisible" : { + "type" : "boolean" + }, + "provisioningAllowed" : { + "type" : "boolean" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "visibleApps" : { + "type" : "object", + "properties" : { + "links" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "related" : { + "type" : "string", + "format" : "uri-reference" + } + } + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + }, + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + }, + "links" : { + "$ref" : "#/components/schemas/ResourceLinks" + } + }, + "required" : [ "links", "id", "type" ] + }, + "UsersResponse" : { + "type" : "object", + "title" : "UsersResponse", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/User" + } + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/App" + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "UserResponse" : { + "type" : "object", + "title" : "UserResponse", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/User" + }, + "included" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/App" + } + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "UserUpdateRequest" : { + "type" : "object", + "title" : "UserUpdateRequest", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "users" ] + }, + "id" : { + "type" : "string" + }, + "attributes" : { + "type" : "object", + "properties" : { + "roles" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UserRole" + } + }, + "allAppsVisible" : { + "type" : "boolean" + }, + "provisioningAllowed" : { + "type" : "boolean" + } + } + }, + "relationships" : { + "type" : "object", + "properties" : { + "visibleApps" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + } + } + } + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppEncryptionDeclarationBuildsLinkagesRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + }, + "AppPreviewSetAppPreviewsLinkagesResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreviews" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppPreviewSetAppPreviewsLinkagesRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appPreviews" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + }, + "AppScreenshotSetAppScreenshotsLinkagesResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appScreenshots" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "AppScreenshotSetAppScreenshotsLinkagesRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appScreenshots" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + }, + "AppStoreVersionBuildLinkageResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "AppStoreVersionBuildLinkageRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "AppBetaTestersLinkagesRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaTesters" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + }, + "BetaGroupBetaTestersLinkagesResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaTesters" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BetaGroupBetaTestersLinkagesRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaTesters" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + }, + "BetaGroupBuildsLinkagesResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BetaGroupBuildsLinkagesRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + }, + "BetaTesterAppsLinkagesResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BetaTesterAppsLinkagesRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + }, + "BetaTesterBetaGroupsLinkagesResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaGroups" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BetaTesterBetaGroupsLinkagesRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaGroups" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + }, + "BetaTesterBuildsLinkagesResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BetaTesterBuildsLinkagesRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "builds" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + }, + "BuildAppEncryptionDeclarationLinkageResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appEncryptionDeclarations" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + }, + "links" : { + "$ref" : "#/components/schemas/DocumentLinks" + } + }, + "required" : [ "data", "links" ] + }, + "BuildAppEncryptionDeclarationLinkageRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "appEncryptionDeclarations" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "required" : [ "data" ] + }, + "BuildBetaGroupsLinkagesRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaGroups" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + }, + "BuildIndividualTestersLinkagesResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaTesters" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "BuildIndividualTestersLinkagesRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "betaTesters" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + }, + "GameCenterEnabledVersionCompatibleVersionsLinkagesResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "gameCenterEnabledVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "GameCenterEnabledVersionCompatibleVersionsLinkagesRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "gameCenterEnabledVersions" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + }, + "UserVisibleAppsLinkagesResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + }, + "links" : { + "$ref" : "#/components/schemas/PagedDocumentLinks" + }, + "meta" : { + "$ref" : "#/components/schemas/PagingInformation" + } + }, + "required" : [ "data", "links" ] + }, + "UserVisibleAppsLinkagesRequest" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "apps" ] + }, + "id" : { + "type" : "string" + } + }, + "required" : [ "id", "type" ] + } + } + }, + "required" : [ "data" ] + }, + "ErrorResponse" : { + "type" : "object", + "properties" : { + "errors" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string" + }, + "status" : { + "type" : "string" + }, + "code" : { + "type" : "string" + }, + "title" : { + "type" : "string" + }, + "detail" : { + "type" : "string" + }, + "source" : { + "oneOf" : [ { + "type" : "object", + "title" : "JsonPointer", + "properties" : { + "pointer" : { + "type" : "string" + } + } + }, { + "type" : "object", + "title" : "Parameter", + "properties" : { + "parameter" : { + "type" : "string" + } + } + } ] + } + }, + "required" : [ "code", "detail", "title", "status" ] + } + } + } + }, + "PagedDocumentLinks" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + }, + "first" : { + "type" : "string", + "format" : "uri-reference" + }, + "next" : { + "type" : "string", + "format" : "uri-reference" + } + }, + "required" : [ "self" ] + }, + "PagingInformation" : { + "type" : "object", + "properties" : { + "paging" : { + "type" : "object", + "properties" : { + "total" : { + "type" : "integer" + }, + "limit" : { + "type" : "integer" + } + }, + "required" : [ "total", "limit" ] + } + }, + "required" : [ "paging" ] + }, + "DocumentLinks" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + } + }, + "required" : [ "self" ] + }, + "ResourceLinks" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "string", + "format" : "uri-reference" + } + }, + "required" : [ "self" ] + }, + "AppEncryptionDeclarationState" : { + "type" : "string", + "enum" : [ "IN_REVIEW", "APPROVED", "REJECTED", "INVALID", "EXPIRED" ] + }, + "AppMediaAssetState" : { + "type" : "object", + "properties" : { + "errors" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppMediaStateError" + } + }, + "warnings" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AppMediaStateError" + } + }, + "state" : { + "type" : "string", + "enum" : [ "AWAITING_UPLOAD", "UPLOAD_COMPLETE", "COMPLETE", "FAILED" ] + } + } + }, + "AppMediaStateError" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "string" + }, + "description" : { + "type" : "string" + } + } + }, + "AppStoreAgeRating" : { + "type" : "string", + "enum" : [ "FOUR_PLUS", "NINE_PLUS", "TWELVE_PLUS", "SEVENTEEN_PLUS" ] + }, + "AppStoreVersionState" : { + "type" : "string", + "enum" : [ "DEVELOPER_REMOVED_FROM_SALE", "DEVELOPER_REJECTED", "IN_REVIEW", "INVALID_BINARY", "METADATA_REJECTED", "PENDING_APPLE_RELEASE", "PENDING_CONTRACT", "PENDING_DEVELOPER_RELEASE", "PREPARE_FOR_SUBMISSION", "PREORDER_READY_FOR_SALE", "PROCESSING_FOR_APP_STORE", "READY_FOR_SALE", "REJECTED", "REMOVED_FROM_SALE", "WAITING_FOR_EXPORT_COMPLIANCE", "WAITING_FOR_REVIEW", "REPLACED_WITH_NEW_VERSION" ] + }, + "BetaInviteType" : { + "type" : "string", + "enum" : [ "EMAIL", "PUBLIC_LINK" ] + }, + "BetaReviewState" : { + "type" : "string", + "enum" : [ "WAITING_FOR_REVIEW", "IN_REVIEW", "REJECTED", "APPROVED" ] + }, + "BrazilAgeRating" : { + "type" : "string", + "enum" : [ "L", "TEN", "TWELVE", "FOURTEEN", "SIXTEEN", "EIGHTEEN" ] + }, + "BundleIdPlatform" : { + "type" : "string", + "enum" : [ "IOS", "MAC_OS" ] + }, + "CapabilityOption" : { + "type" : "object", + "properties" : { + "key" : { + "type" : "string", + "enum" : [ "XCODE_5", "XCODE_6", "COMPLETE_PROTECTION", "PROTECTED_UNLESS_OPEN", "PROTECTED_UNTIL_FIRST_USER_AUTH", "PRIMARY_APP_CONSENT" ] + }, + "name" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "enabledByDefault" : { + "type" : "boolean" + }, + "enabled" : { + "type" : "boolean" + }, + "supportsWildcard" : { + "type" : "boolean" + } + } + }, + "CapabilitySetting" : { + "type" : "object", + "properties" : { + "key" : { + "type" : "string", + "enum" : [ "ICLOUD_VERSION", "DATA_PROTECTION_PERMISSION_LEVEL", "APPLE_ID_AUTH_APP_CONSENT" ] + }, + "name" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "enabledByDefault" : { + "type" : "boolean" + }, + "visible" : { + "type" : "boolean" + }, + "allowedInstances" : { + "type" : "string", + "enum" : [ "ENTRY", "SINGLE", "MULTIPLE" ] + }, + "minInstances" : { + "type" : "integer" + }, + "options" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/CapabilityOption" + } + } + } + }, + "CapabilityType" : { + "type" : "string", + "enum" : [ "ICLOUD", "IN_APP_PURCHASE", "GAME_CENTER", "PUSH_NOTIFICATIONS", "WALLET", "INTER_APP_AUDIO", "MAPS", "ASSOCIATED_DOMAINS", "PERSONAL_VPN", "APP_GROUPS", "HEALTHKIT", "HOMEKIT", "WIRELESS_ACCESSORY_CONFIGURATION", "APPLE_PAY", "DATA_PROTECTION", "SIRIKIT", "NETWORK_EXTENSIONS", "MULTIPATH", "HOT_SPOT", "NFC_TAG_READING", "CLASSKIT", "AUTOFILL_CREDENTIAL_PROVIDER", "ACCESS_WIFI_INFORMATION", "NETWORK_CUSTOM_PROTOCOL", "COREMEDIA_HLS_LOW_LATENCY", "SYSTEM_EXTENSION_INSTALL", "USER_MANAGEMENT", "APPLE_ID_AUTH" ] + }, + "CertificateType" : { + "type" : "string", + "enum" : [ "IOS_DEVELOPMENT", "IOS_DISTRIBUTION", "MAC_APP_DISTRIBUTION", "MAC_INSTALLER_DISTRIBUTION", "MAC_APP_DEVELOPMENT", "DEVELOPER_ID_KEXT", "DEVELOPER_ID_APPLICATION", "DEVELOPMENT", "DISTRIBUTION" ] + }, + "ExternalBetaState" : { + "type" : "string", + "enum" : [ "PROCESSING", "PROCESSING_EXCEPTION", "MISSING_EXPORT_COMPLIANCE", "READY_FOR_BETA_TESTING", "IN_BETA_TESTING", "EXPIRED", "READY_FOR_BETA_SUBMISSION", "IN_EXPORT_COMPLIANCE_REVIEW", "WAITING_FOR_BETA_REVIEW", "IN_BETA_REVIEW", "BETA_REJECTED", "BETA_APPROVED" ] + }, + "IconAssetType" : { + "type" : "string", + "enum" : [ "APP_STORE", "MESSAGES_APP_STORE", "WATCH_APP_STORE", "TV_OS_HOME_SCREEN", "TV_OS_TOP_SHELF" ] + }, + "ImageAsset" : { + "type" : "object", + "properties" : { + "templateUrl" : { + "type" : "string" + }, + "width" : { + "type" : "integer" + }, + "height" : { + "type" : "integer" + } + } + }, + "InternalBetaState" : { + "type" : "string", + "enum" : [ "PROCESSING", "PROCESSING_EXCEPTION", "MISSING_EXPORT_COMPLIANCE", "READY_FOR_BETA_TESTING", "IN_BETA_TESTING", "EXPIRED", "IN_EXPORT_COMPLIANCE_REVIEW" ] + }, + "KidsAgeBand" : { + "type" : "string", + "enum" : [ "FIVE_AND_UNDER", "SIX_TO_EIGHT", "NINE_TO_ELEVEN" ] + }, + "PhasedReleaseState" : { + "type" : "string", + "enum" : [ "INACTIVE", "ACTIVE", "PAUSED", "COMPLETE" ] + }, + "Platform" : { + "type" : "string", + "enum" : [ "IOS", "MAC_OS", "TV_OS" ] + }, + "PreviewType" : { + "type" : "string", + "enum" : [ "IPHONE_65", "IPHONE_58", "IPHONE_55", "IPHONE_47", "IPHONE_40", "IPHONE_35", "IPAD_PRO_3GEN_129", "IPAD_PRO_3GEN_11", "IPAD_PRO_129", "IPAD_105", "IPAD_97", "DESKTOP", "WATCH_SERIES_4", "WATCH_SERIES_3", "APPLE_TV" ] + }, + "ScreenshotDisplayType" : { + "type" : "string", + "enum" : [ "APP_IPHONE_65", "APP_IPHONE_58", "APP_IPHONE_55", "APP_IPHONE_47", "APP_IPHONE_40", "APP_IPHONE_35", "APP_IPAD_PRO_3GEN_129", "APP_IPAD_PRO_3GEN_11", "APP_IPAD_PRO_129", "APP_IPAD_105", "APP_IPAD_97", "APP_DESKTOP", "APP_WATCH_SERIES_4", "APP_WATCH_SERIES_3", "APP_APPLE_TV", "IMESSAGE_APP_IPHONE_65", "IMESSAGE_APP_IPHONE_58", "IMESSAGE_APP_IPHONE_55", "IMESSAGE_APP_IPHONE_47", "IMESSAGE_APP_IPHONE_40", "IMESSAGE_APP_IPAD_PRO_3GEN_129", "IMESSAGE_APP_IPAD_PRO_3GEN_11", "IMESSAGE_APP_IPAD_PRO_129", "IMESSAGE_APP_IPAD_105", "IMESSAGE_APP_IPAD_97" ] + }, + "UploadOperation" : { + "type" : "object", + "properties" : { + "method" : { + "type" : "string" + }, + "url" : { + "type" : "string" + }, + "length" : { + "type" : "integer" + }, + "offset" : { + "type" : "integer" + }, + "requestHeaders" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UploadOperationHeader" + } + } + } + }, + "UploadOperationHeader" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + }, + "value" : { + "type" : "string" + } + } + }, + "UserRole" : { + "type" : "string", + "enum" : [ "ADMIN", "FINANCE", "TECHNICAL", "ACCOUNT_HOLDER", "READ_ONLY", "SALES", "MARKETING", "APP_MANAGER", "DEVELOPER", "ACCESS_TO_REPORTS", "CUSTOMER_SUPPORT" ] + } + }, + "securitySchemes" : { + "itc-bearer-token" : { + "type" : "http", + "scheme" : "bearer", + "bearerFormat" : "JWT" + } + } + }, + "security" : [ { + "itc-bearer-token" : [ ] + } ] +} \ No newline at end of file From 180b012a8ff44c865c42b13dbf06bf26bd235cb8 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Wed, 16 Sep 2020 15:18:38 +1000 Subject: [PATCH 2/3] Escape self using underscore --- Sources/SwagGenKit/CodeFormatter.swift | 8 +- Sources/SwagGenKit/SwiftFormatter.swift | 130 +++++++------- .../generated/Swift/Sources/Models/App.swift | 168 +++++++++--------- .../Swift/Sources/Models/AppCategory.swift | 24 +-- .../Models/AppEncryptionDeclaration.swift | 12 +- .../Swift/Sources/Models/AppInfo.swift | 96 +++++----- .../Sources/Models/AppInfoLocalization.swift | 12 +- .../Swift/Sources/Models/AppPreOrder.swift | 12 +- .../Swift/Sources/Models/AppPreview.swift | 12 +- .../Swift/Sources/Models/AppPreviewSet.swift | 24 +-- .../Swift/Sources/Models/AppPrice.swift | 24 +-- .../Swift/Sources/Models/AppPricePoint.swift | 24 +-- .../Swift/Sources/Models/AppPriceTier.swift | 12 +- .../Swift/Sources/Models/AppScreenshot.swift | 12 +- .../Sources/Models/AppScreenshotSet.swift | 24 +-- .../Models/AppStoreReviewAttachment.swift | 12 +- .../Sources/Models/AppStoreReviewDetail.swift | 24 +-- .../Sources/Models/AppStoreVersion.swift | 108 +++++------ .../Models/AppStoreVersionLocalization.swift | 36 ++-- .../Models/AppStoreVersionSubmission.swift | 12 +- .../Sources/Models/BetaAppLocalization.swift | 12 +- .../Sources/Models/BetaAppReviewDetail.swift | 12 +- .../Models/BetaAppReviewSubmission.swift | 12 +- .../Models/BetaBuildLocalization.swift | 12 +- .../Swift/Sources/Models/BetaGroup.swift | 36 ++-- .../Sources/Models/BetaLicenseAgreement.swift | 12 +- .../Swift/Sources/Models/BetaTester.swift | 36 ++-- .../Swift/Sources/Models/Build.swift | 108 +++++------ .../Sources/Models/BuildBetaDetail.swift | 12 +- .../Swift/Sources/Models/BundleId.swift | 36 ++-- .../Swift/Sources/Models/DocumentLinks.swift | 12 +- .../Models/EndUserLicenseAgreement.swift | 24 +-- .../Models/GameCenterEnabledVersion.swift | 24 +-- .../Sources/Models/IdfaDeclaration.swift | 12 +- .../Swift/Sources/Models/InAppPurchase.swift | 12 +- .../Sources/Models/PagedDocumentLinks.swift | 12 +- .../Sources/Models/PrereleaseVersion.swift | 24 +-- .../Swift/Sources/Models/Profile.swift | 36 ++-- .../Swift/Sources/Models/ResourceLinks.swift | 12 +- .../Sources/Models/RoutingAppCoverage.swift | 12 +- .../generated/Swift/Sources/Models/User.swift | 12 +- .../Swift/Sources/Models/UserInvitation.swift | 12 +- 42 files changed, 641 insertions(+), 637 deletions(-) diff --git a/Sources/SwagGenKit/CodeFormatter.swift b/Sources/SwagGenKit/CodeFormatter.swift index db3416237..fb1bf4905 100644 --- a/Sources/SwagGenKit/CodeFormatter.swift +++ b/Sources/SwagGenKit/CodeFormatter.swift @@ -27,11 +27,11 @@ public class CodeFormatter { propertyNames = templateConfig.options["propertyNames"] as? [String: String] ?? [:] } - var disallowedNames: [String] { + var escapedNames: [String] { return [] } - var disallowedTypes: [String] { + var escapedTypes: [String] { return [] } @@ -529,12 +529,12 @@ public class CodeFormatter { func escapeName(_ name: String) -> String { let string = escapeString(name) - return disallowedNames.contains(string) ? getEscapedName(string) : string + return escapedNames.contains(string) ? getEscapedName(string) : string } func escapeType(_ type: String) -> String { let string = escapeString(type) - return disallowedTypes.contains(string) ? getEscapedType(string) : string + return escapedTypes.contains(string) ? getEscapedType(string) : string } func getEscapedType(_ type: String) -> String { diff --git a/Sources/SwagGenKit/SwiftFormatter.swift b/Sources/SwagGenKit/SwiftFormatter.swift index 0dbae589e..258691799 100644 --- a/Sources/SwagGenKit/SwiftFormatter.swift +++ b/Sources/SwagGenKit/SwiftFormatter.swift @@ -3,73 +3,73 @@ import Swagger public class SwiftFormatter: CodeFormatter { - var disallowedKeywords: [String] { - return [ - "Type", - "Protocol", - "class", - "struct", - "enum", - "protocol", - "extension", - "return", - "throw", - "throws", - "rethrows", - "public", - "open", - "private", - "fileprivate", - "internal", - "let", - "var", - "where", - "guard", - "associatedtype", - "deinit", - "func", - "import", - "inout", - "operator", - "static", - "subscript", - "typealias", - "case", - "break", - "continue", - "default", - "defer", - "do", - "else", - "fallthrough", - "for", - "if", - "in", - "repeat", - "switch", - "where", - "while", - "as", - "Any", - "AnyObject", - "catch", - "false", - "true", - "is", - "nil", - "super", - "self", - "Self", - ] - } + let keywords: [String] = [ + "Type", + "Protocol", + "class", + "struct", + "enum", + "protocol", + "extension", + "return", + "throw", + "throws", + "rethrows", + "public", + "open", + "private", + "fileprivate", + "internal", + "let", + "var", + "where", + "guard", + "associatedtype", + "deinit", + "func", + "import", + "inout", + "operator", + "static", + "subscript", + "typealias", + "case", + "break", + "continue", + "default", + "defer", + "do", + "else", + "fallthrough", + "for", + "if", + "in", + "repeat", + "switch", + "where", + "while", + "as", + "Any", + "AnyObject", + "catch", + "false", + "true", + "is", + "nil", + "super", + "self", + "Self", + ] - var inbuiltTypes: [String] = [ + let inbuiltTypes: [String] = [ "Error", "Data", ] - override var disallowedNames: [String] { return disallowedKeywords + inbuiltTypes } - override var disallowedTypes: [String] { return disallowedKeywords + inbuiltTypes } + let disallowedNames = ["self"] + + override var escapedNames: [String] { return keywords + inbuiltTypes } + override var escapedTypes: [String] { return keywords + inbuiltTypes } let fixedWidthIntegers: Bool @@ -258,6 +258,10 @@ public class SwiftFormatter: CodeFormatter { } override func getEscapedName(_ name: String) -> String { - return "`\(name)`" + if disallowedNames.contains(name) { + return "_\(name)" + } else { + return "`\(name)`" + } } } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/App.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/App.swift index cc1a84ec1..c060acfcc 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/App.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/App.swift @@ -176,31 +176,31 @@ public class App: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -297,31 +297,31 @@ public class App: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -418,31 +418,31 @@ public class App: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -539,31 +539,31 @@ public class App: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -658,31 +658,31 @@ public class App: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -775,31 +775,31 @@ public class App: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -894,31 +894,31 @@ public class App: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -1011,31 +1011,31 @@ public class App: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -1130,31 +1130,31 @@ public class App: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -1247,31 +1247,31 @@ public class App: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -1368,31 +1368,31 @@ public class App: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -1487,31 +1487,31 @@ public class App: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -1604,31 +1604,31 @@ public class App: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -1725,31 +1725,31 @@ public class App: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategory.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategory.swift index bf9771539..359b22095 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategory.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppCategory.swift @@ -109,31 +109,31 @@ public class AppCategory: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -226,31 +226,31 @@ public class AppCategory: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclaration.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclaration.swift index e541c3917..65b8f7c8e 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclaration.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppEncryptionDeclaration.swift @@ -173,31 +173,31 @@ public class AppEncryptionDeclaration: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfo.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfo.swift index f191e9ca1..92fd713b5 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfo.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfo.swift @@ -139,31 +139,31 @@ public class AppInfo: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -256,31 +256,31 @@ public class AppInfo: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -375,31 +375,31 @@ public class AppInfo: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -490,31 +490,31 @@ public class AppInfo: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -605,31 +605,31 @@ public class AppInfo: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -720,31 +720,31 @@ public class AppInfo: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -835,31 +835,31 @@ public class AppInfo: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -950,31 +950,31 @@ public class AppInfo: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalization.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalization.swift index 7fb8b3f27..93ec6ec8f 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalization.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppInfoLocalization.swift @@ -131,31 +131,31 @@ public class AppInfoLocalization: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrder.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrder.swift index 3c5046768..fe296ec48 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrder.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreOrder.swift @@ -113,31 +113,31 @@ public class AppPreOrder: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreview.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreview.swift index 7d3d9f414..d7897c85d 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreview.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreview.swift @@ -155,31 +155,31 @@ public class AppPreview: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSet.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSet.swift index 71581e259..d459144a1 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSet.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPreviewSet.swift @@ -111,31 +111,31 @@ public class AppPreviewSet: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -230,31 +230,31 @@ public class AppPreviewSet: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPrice.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPrice.swift index 22ab51995..1089a4855 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPrice.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPrice.swift @@ -76,31 +76,31 @@ public class AppPrice: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -191,31 +191,31 @@ public class AppPrice: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePoint.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePoint.swift index 2bb8bf9c1..41b3f20a0 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePoint.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPricePoint.swift @@ -115,31 +115,31 @@ public class AppPricePoint: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -230,31 +230,31 @@ public class AppPricePoint: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTier.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTier.swift index 44101a310..c9be2f50a 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTier.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppPriceTier.swift @@ -76,31 +76,31 @@ public class AppPriceTier: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshot.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshot.swift index 42760c67d..5d02bc95b 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshot.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshot.swift @@ -149,31 +149,31 @@ public class AppScreenshot: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSet.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSet.swift index ee7a95d59..e05272bc7 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSet.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppScreenshotSet.swift @@ -111,31 +111,31 @@ public class AppScreenshotSet: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -230,31 +230,31 @@ public class AppScreenshotSet: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachment.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachment.swift index 6d768f253..6b16ff213 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachment.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewAttachment.swift @@ -131,31 +131,31 @@ public class AppStoreReviewAttachment: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetail.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetail.swift index 7199ccffc..55a9be630 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetail.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreReviewDetail.swift @@ -153,31 +153,31 @@ public class AppStoreReviewDetail: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -272,31 +272,31 @@ public class AppStoreReviewDetail: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersion.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersion.swift index 64684cbf7..8f5ffcbbf 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersion.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersion.swift @@ -177,31 +177,31 @@ public class AppStoreVersion: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -292,31 +292,31 @@ public class AppStoreVersion: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -407,31 +407,31 @@ public class AppStoreVersion: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -524,31 +524,31 @@ public class AppStoreVersion: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -643,31 +643,31 @@ public class AppStoreVersion: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -758,31 +758,31 @@ public class AppStoreVersion: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -873,31 +873,31 @@ public class AppStoreVersion: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -988,31 +988,31 @@ public class AppStoreVersion: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -1103,31 +1103,31 @@ public class AppStoreVersion: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalization.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalization.swift index d353abc44..b88015c18 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalization.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionLocalization.swift @@ -149,31 +149,31 @@ public class AppStoreVersionLocalization: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -270,31 +270,31 @@ public class AppStoreVersionLocalization: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -389,31 +389,31 @@ public class AppStoreVersionLocalization: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmission.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmission.swift index 533167e76..f3f3c2e1e 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmission.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/AppStoreVersionSubmission.swift @@ -74,31 +74,31 @@ public class AppStoreVersionSubmission: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalization.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalization.swift index 0fa84db44..5da183509 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalization.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppLocalization.swift @@ -137,31 +137,31 @@ public class BetaAppLocalization: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetail.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetail.swift index c7256fa14..572c734a5 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetail.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewDetail.swift @@ -149,31 +149,31 @@ public class BetaAppReviewDetail: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmission.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmission.swift index 93557dda7..a6c11dc3f 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmission.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaAppReviewSubmission.swift @@ -107,31 +107,31 @@ public class BetaAppReviewSubmission: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalization.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalization.swift index 0c19fe680..84dcf9004 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalization.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaBuildLocalization.swift @@ -113,31 +113,31 @@ public class BetaBuildLocalization: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroup.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroup.swift index 343626b88..a1e3b51c8 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroup.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaGroup.swift @@ -159,31 +159,31 @@ public class BetaGroup: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -276,31 +276,31 @@ public class BetaGroup: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -397,31 +397,31 @@ public class BetaGroup: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreement.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreement.swift index 2c24cca54..403ab0eae 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreement.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaLicenseAgreement.swift @@ -107,31 +107,31 @@ public class BetaLicenseAgreement: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTester.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTester.swift index 291e4deb7..f4ce472a2 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTester.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BetaTester.swift @@ -131,31 +131,31 @@ public class BetaTester: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -252,31 +252,31 @@ public class BetaTester: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -373,31 +373,31 @@ public class BetaTester: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/Build.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Build.swift index 4ccb78e73..7cd7071d3 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/Build.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Build.swift @@ -172,31 +172,31 @@ public class Build: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -287,31 +287,31 @@ public class Build: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -402,31 +402,31 @@ public class Build: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -517,31 +517,31 @@ public class Build: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -634,31 +634,31 @@ public class Build: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -753,31 +753,31 @@ public class Build: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -870,31 +870,31 @@ public class Build: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -991,31 +991,31 @@ public class Build: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -1110,31 +1110,31 @@ public class Build: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetail.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetail.swift index 4f48e8ce1..e5016351c 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetail.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BuildBetaDetail.swift @@ -119,31 +119,31 @@ public class BuildBetaDetail: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleId.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleId.swift index c55205e08..b1ad3cde7 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleId.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/BundleId.swift @@ -129,31 +129,31 @@ public class BundleId: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -246,31 +246,31 @@ public class BundleId: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -367,31 +367,31 @@ public class BundleId: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/DocumentLinks.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DocumentLinks.swift index 1e6036020..3d11c1827 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/DocumentLinks.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/DocumentLinks.swift @@ -7,27 +7,27 @@ import Foundation public class DocumentLinks: APIModel { - public var `self`: String + public var _self: String - public init(`self`: String) { - self.`self` = `self` + public init(_self: String) { + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) - `self` = try container.decode("self") + _self = try container.decode("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) - try container.encode(`self`, forKey: "self") + try container.encode(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? DocumentLinks else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreement.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreement.swift index 323ca1756..1d9df55c4 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreement.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/EndUserLicenseAgreement.swift @@ -109,31 +109,31 @@ public class EndUserLicenseAgreement: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -226,31 +226,31 @@ public class EndUserLicenseAgreement: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersion.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersion.swift index a76f6b78f..85c922820 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersion.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/GameCenterEnabledVersion.swift @@ -121,31 +121,31 @@ public class GameCenterEnabledVersion: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -238,31 +238,31 @@ public class GameCenterEnabledVersion: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclaration.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclaration.swift index 5cc7451b6..d7d849ead 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclaration.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/IdfaDeclaration.swift @@ -125,31 +125,31 @@ public class IdfaDeclaration: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchase.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchase.swift index fd52524b6..b56acef80 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchase.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/InAppPurchase.swift @@ -157,31 +157,31 @@ public class InAppPurchase: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/PagedDocumentLinks.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PagedDocumentLinks.swift index aefdfcdda..88e9b8904 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/PagedDocumentLinks.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PagedDocumentLinks.swift @@ -7,14 +7,14 @@ import Foundation public class PagedDocumentLinks: APIModel { - public var `self`: String + public var _self: String public var first: String? public var next: String? - public init(`self`: String, first: String? = nil, next: String? = nil) { - self.`self` = `self` + public init(_self: String, first: String? = nil, next: String? = nil) { + self._self = _self self.first = first self.next = next } @@ -22,7 +22,7 @@ public class PagedDocumentLinks: APIModel { public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) - `self` = try container.decode("self") + _self = try container.decode("self") first = try container.decodeIfPresent("first") next = try container.decodeIfPresent("next") } @@ -30,14 +30,14 @@ public class PagedDocumentLinks: APIModel { public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) - try container.encode(`self`, forKey: "self") + try container.encode(_self, forKey: "self") try container.encodeIfPresent(first, forKey: "first") try container.encodeIfPresent(next, forKey: "next") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? PagedDocumentLinks else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } guard self.first == object.first else { return false } guard self.next == object.next else { return false } return true diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/PrereleaseVersion.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PrereleaseVersion.swift index 2c4179d05..de3aa87cb 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/PrereleaseVersion.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/PrereleaseVersion.swift @@ -115,31 +115,31 @@ public class PrereleaseVersion: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -232,31 +232,31 @@ public class PrereleaseVersion: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/Profile.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Profile.swift index 4022d1a8f..e8a8a8b65 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/Profile.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/Profile.swift @@ -175,31 +175,31 @@ public class Profile: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -292,31 +292,31 @@ public class Profile: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } @@ -413,31 +413,31 @@ public class Profile: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/ResourceLinks.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ResourceLinks.swift index 714d6abc6..8f5e8d818 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/ResourceLinks.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/ResourceLinks.swift @@ -7,27 +7,27 @@ import Foundation public class ResourceLinks: APIModel { - public var `self`: String + public var _self: String - public init(`self`: String) { - self.`self` = `self` + public init(_self: String) { + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) - `self` = try container.decode("self") + _self = try container.decode("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) - try container.encode(`self`, forKey: "self") + try container.encode(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? ResourceLinks else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverage.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverage.swift index 540f204ac..0f0191bcb 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverage.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/RoutingAppCoverage.swift @@ -131,31 +131,31 @@ public class RoutingAppCoverage: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/User.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/User.swift index 9702970cf..1d927a3e9 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/User.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/User.swift @@ -139,31 +139,31 @@ public class User: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitation.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitation.swift index cfeeee742..1814ca515 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitation.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Models/UserInvitation.swift @@ -145,31 +145,31 @@ public class UserInvitation: APIModel { public var related: String? - public var `self`: String? + public var _self: String? - public init(related: String? = nil, `self`: String? = nil) { + public init(related: String? = nil, _self: String? = nil) { self.related = related - self.`self` = `self` + self._self = _self } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) related = try container.decodeIfPresent("related") - `self` = try container.decodeIfPresent("self") + _self = try container.decodeIfPresent("self") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) try container.encodeIfPresent(related, forKey: "related") - try container.encodeIfPresent(`self`, forKey: "self") + try container.encodeIfPresent(_self, forKey: "self") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? Links else { return false } guard self.related == object.related else { return false } - guard self.`self` == object.`self` else { return false } + guard self._self == object._self else { return false } return true } From 56a25e47b4f0a366c107b04d8aae5d9d416703c7 Mon Sep 17 00:00:00 2001 From: yonaskolb Date: Fri, 18 Sep 2020 00:23:29 +1000 Subject: [PATCH 3/3] escape - with _ and allow _ in beginning of name --- Sources/SwagGenKit/CodeFormatter.swift | 6 ++++-- Sources/SwagGenKit/Utilities.swift | 2 +- ...psGameCenterEnabledVersionsGetToManyRelated.swift | 2 +- .../Sources/Requests/Apps/AppsGetCollection.swift | 6 +++--- .../Apps/AppsInAppPurchasesGetToManyRelated.swift | 6 +++--- .../BetaGroups/BetaGroupsGetCollection.swift | 8 ++++---- .../BetaTesters/BetaTestersGetCollection.swift | 8 ++++---- .../Requests/Builds/BuildsGetCollection.swift | 6 +++--- .../Requests/BundleIds/BundleIdsGetCollection.swift | 10 +++++----- .../Certificates/CertificatesGetCollection.swift | 8 ++++---- .../Requests/Devices/DevicesGetCollection.swift | 10 +++++----- ...dVersionsCompatibleVersionsGetToManyRelated.swift | 2 +- .../PreReleaseVersionsGetCollection.swift | 2 +- .../Requests/Profiles/ProfilesGetCollection.swift | 8 ++++---- .../UserInvitationsGetCollection.swift | 4 ++-- .../Sources/Requests/Users/UsersGetCollection.swift | 4 ++-- .../generated/Swift/Sources/Models/ClassModel.swift | 12 ++++++------ .../generated/Swift/Sources/Models/EnumClass.swift | 4 ++-- .../Sources/Requests/Fake/TestEnumParameters.swift | 12 ++++++------ 19 files changed, 61 insertions(+), 59 deletions(-) diff --git a/Sources/SwagGenKit/CodeFormatter.swift b/Sources/SwagGenKit/CodeFormatter.swift index fb1bf4905..ad852701b 100644 --- a/Sources/SwagGenKit/CodeFormatter.swift +++ b/Sources/SwagGenKit/CodeFormatter.swift @@ -479,12 +479,14 @@ public class CodeFormatter { ("#", "hash"), ("@", "alpha"), ("&", "and"), + ("-", "_") ] var escapedString = string for (symbol, replacement) in replacements { escapedString = escapedString.replacingOccurrences(of: symbol, with: replacement) } - escapedString = String(String.UnicodeScalarView(escapedString.unicodeScalars.filter { CharacterSet.alphanumerics.contains($0) })) + let allowedCharacters = CharacterSet.alphanumerics.union(CharacterSet(charactersIn: "_")) + escapedString = String(String.UnicodeScalarView(escapedString.unicodeScalars.filter { allowedCharacters.contains($0) })) // prepend _ strings starting with numbers if let firstCharacter = escapedString.unicodeScalars.first, @@ -501,7 +503,7 @@ public class CodeFormatter { // MARK: name and types func getName(_ name: String) -> String { - var name = name.replacingOccurrences(of: "^-(\\d)", with: "_negative$1", options: .regularExpression) + var name = name.replacingOccurrences(of: "^-(\\d)", with: "negative$1", options: .regularExpression) name = name.lowerCamelCased() return escapeName(name) } diff --git a/Sources/SwagGenKit/Utilities.swift b/Sources/SwagGenKit/Utilities.swift index 9798a77b1..f2d6514e3 100644 --- a/Sources/SwagGenKit/Utilities.swift +++ b/Sources/SwagGenKit/Utilities.swift @@ -65,7 +65,7 @@ fileprivate let acronymStrings = ["URL"] extension String { private func camelCased(seperator: String) -> String { - + guard !hasPrefix(seperator) else { return self } var index = 0 let components = self.components(separatedBy: seperator) if uppercased() == self { diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGameCenterEnabledVersionsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGameCenterEnabledVersionsGetToManyRelated.swift index 243032ae4..b444f1bed 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGameCenterEnabledVersionsGetToManyRelated.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGameCenterEnabledVersionsGetToManyRelated.swift @@ -21,7 +21,7 @@ extension AppStoreConnect.Apps { /** comma-separated list of sort expressions; resources will be sorted as specified */ public enum Sort: String, Codable, Equatable, CaseIterable { case versionString = "versionString" - case versionString = "-versionString" + case _versionString = "-versionString" } /** the fields to include for returned resources of type gameCenterEnabledVersions */ diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGetCollection.swift index 018f5837e..f7ba7c73b 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGetCollection.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsGetCollection.swift @@ -42,11 +42,11 @@ extension AppStoreConnect.Apps { /** comma-separated list of sort expressions; resources will be sorted as specified */ public enum Sort: String, Codable, Equatable, CaseIterable { case bundleId = "bundleId" - case bundleId = "-bundleId" + case _bundleId = "-bundleId" case name = "name" - case name = "-name" + case _name = "-name" case sku = "sku" - case sku = "-sku" + case _sku = "-sku" } /** the fields to include for returned resources of type apps */ diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsInAppPurchasesGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsInAppPurchasesGetToManyRelated.swift index 4fcd5dad9..68339c260 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsInAppPurchasesGetToManyRelated.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Apps/AppsInAppPurchasesGetToManyRelated.swift @@ -23,11 +23,11 @@ extension AppStoreConnect.Apps { /** comma-separated list of sort expressions; resources will be sorted as specified */ public enum Sort: String, Codable, Equatable, CaseIterable { case inAppPurchaseType = "inAppPurchaseType" - case inAppPurchaseType = "-inAppPurchaseType" + case _inAppPurchaseType = "-inAppPurchaseType" case productId = "productId" - case productId = "-productId" + case _productId = "-productId" case referenceName = "referenceName" - case referenceName = "-referenceName" + case _referenceName = "-referenceName" } /** the fields to include for returned resources of type inAppPurchases */ diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsGetCollection.swift index 30317eca8..9cdc54015 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsGetCollection.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaGroups/BetaGroupsGetCollection.swift @@ -14,13 +14,13 @@ extension AppStoreConnect.BetaGroups { /** comma-separated list of sort expressions; resources will be sorted as specified */ public enum Sort: String, Codable, Equatable, CaseIterable { case createdDate = "createdDate" - case createdDate = "-createdDate" + case _createdDate = "-createdDate" case name = "name" - case name = "-name" + case _name = "-name" case publicLinkEnabled = "publicLinkEnabled" - case publicLinkEnabled = "-publicLinkEnabled" + case _publicLinkEnabled = "-publicLinkEnabled" case publicLinkLimit = "publicLinkLimit" - case publicLinkLimit = "-publicLinkLimit" + case _publicLinkLimit = "-publicLinkLimit" } /** the fields to include for returned resources of type betaGroups */ diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersGetCollection.swift index 377280f60..4db415055 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersGetCollection.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BetaTesters/BetaTestersGetCollection.swift @@ -20,13 +20,13 @@ extension AppStoreConnect.BetaTesters { /** comma-separated list of sort expressions; resources will be sorted as specified */ public enum Sort: String, Codable, Equatable, CaseIterable { case email = "email" - case email = "-email" + case _email = "-email" case firstName = "firstName" - case firstName = "-firstName" + case _firstName = "-firstName" case inviteType = "inviteType" - case inviteType = "-inviteType" + case _inviteType = "-inviteType" case lastName = "lastName" - case lastName = "-lastName" + case _lastName = "-lastName" } /** the fields to include for returned resources of type betaTesters */ diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsGetCollection.swift index 1ac7136b2..f24abb7fd 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsGetCollection.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Builds/BuildsGetCollection.swift @@ -37,11 +37,11 @@ extension AppStoreConnect.Builds { /** comma-separated list of sort expressions; resources will be sorted as specified */ public enum Sort: String, Codable, Equatable, CaseIterable { case preReleaseVersion = "preReleaseVersion" - case preReleaseVersion = "-preReleaseVersion" + case _preReleaseVersion = "-preReleaseVersion" case uploadedDate = "uploadedDate" - case uploadedDate = "-uploadedDate" + case _uploadedDate = "-uploadedDate" case version = "version" - case version = "-version" + case _version = "-version" } /** the fields to include for returned resources of type builds */ diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsGetCollection.swift index b41ba94a8..08d7a9d07 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsGetCollection.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/BundleIds/BundleIdsGetCollection.swift @@ -20,15 +20,15 @@ extension AppStoreConnect.BundleIds { /** comma-separated list of sort expressions; resources will be sorted as specified */ public enum Sort: String, Codable, Equatable, CaseIterable { case id = "id" - case id = "-id" + case _id = "-id" case identifier = "identifier" - case identifier = "-identifier" + case _identifier = "-identifier" case name = "name" - case name = "-name" + case _name = "-name" case platform = "platform" - case platform = "-platform" + case _platform = "-platform" case seedId = "seedId" - case seedId = "-seedId" + case _seedId = "-seedId" } /** the fields to include for returned resources of type bundleIds */ diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesGetCollection.swift index 9f44b7a28..e4306ae3d 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesGetCollection.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Certificates/CertificatesGetCollection.swift @@ -27,13 +27,13 @@ extension AppStoreConnect.Certificates { /** comma-separated list of sort expressions; resources will be sorted as specified */ public enum Sort: String, Codable, Equatable, CaseIterable { case certificateType = "certificateType" - case certificateType = "-certificateType" + case _certificateType = "-certificateType" case displayName = "displayName" - case displayName = "-displayName" + case _displayName = "-displayName" case id = "id" - case id = "-id" + case _id = "-id" case serialNumber = "serialNumber" - case serialNumber = "-serialNumber" + case _serialNumber = "-serialNumber" } /** the fields to include for returned resources of type certificates */ diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesGetCollection.swift index 93d1a0537..5f2f5f4ae 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesGetCollection.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Devices/DevicesGetCollection.swift @@ -26,15 +26,15 @@ extension AppStoreConnect.Devices { /** comma-separated list of sort expressions; resources will be sorted as specified */ public enum Sort: String, Codable, Equatable, CaseIterable { case id = "id" - case id = "-id" + case _id = "-id" case name = "name" - case name = "-name" + case _name = "-name" case platform = "platform" - case platform = "-platform" + case _platform = "-platform" case status = "status" - case status = "-status" + case _status = "-status" case udid = "udid" - case udid = "-udid" + case _udid = "-udid" } /** the fields to include for returned resources of type devices */ diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsGetToManyRelated.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsGetToManyRelated.swift index bebfdcd14..c92126ab2 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsGetToManyRelated.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/GameCenterEnabledVersions/GameCenterEnabledVersionsCompatibleVersionsGetToManyRelated.swift @@ -21,7 +21,7 @@ extension AppStoreConnect.GameCenterEnabledVersions { /** comma-separated list of sort expressions; resources will be sorted as specified */ public enum Sort: String, Codable, Equatable, CaseIterable { case versionString = "versionString" - case versionString = "-versionString" + case _versionString = "-versionString" } /** the fields to include for returned resources of type gameCenterEnabledVersions */ diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsGetCollection.swift index 6cca16618..a9016cd43 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsGetCollection.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/PreReleaseVersions/PreReleaseVersionsGetCollection.swift @@ -29,7 +29,7 @@ extension AppStoreConnect.PreReleaseVersions { /** comma-separated list of sort expressions; resources will be sorted as specified */ public enum Sort: String, Codable, Equatable, CaseIterable { case version = "version" - case version = "-version" + case _version = "-version" } /** the fields to include for returned resources of type preReleaseVersions */ diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesGetCollection.swift index 14f84143a..22995ffac 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesGetCollection.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Profiles/ProfilesGetCollection.swift @@ -38,13 +38,13 @@ extension AppStoreConnect.Profiles { /** comma-separated list of sort expressions; resources will be sorted as specified */ public enum Sort: String, Codable, Equatable, CaseIterable { case id = "id" - case id = "-id" + case _id = "-id" case name = "name" - case name = "-name" + case _name = "-name" case profileState = "profileState" - case profileState = "-profileState" + case _profileState = "-profileState" case profileType = "profileType" - case profileType = "-profileType" + case _profileType = "-profileType" } /** the fields to include for returned resources of type profiles */ diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsGetCollection.swift index dd7b41261..e223bdb12 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsGetCollection.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/UserInvitations/UserInvitationsGetCollection.swift @@ -29,9 +29,9 @@ extension AppStoreConnect.UserInvitations { /** comma-separated list of sort expressions; resources will be sorted as specified */ public enum Sort: String, Codable, Equatable, CaseIterable { case email = "email" - case email = "-email" + case _email = "-email" case lastName = "lastName" - case lastName = "-lastName" + case _lastName = "-lastName" } /** the fields to include for returned resources of type userInvitations */ diff --git a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersGetCollection.swift b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersGetCollection.swift index f5d1f0e8a..4496c7e3a 100644 --- a/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersGetCollection.swift +++ b/Specs/AppStoreConnect/generated/Swift/Sources/Requests/Users/UsersGetCollection.swift @@ -29,9 +29,9 @@ extension AppStoreConnect.Users { /** comma-separated list of sort expressions; resources will be sorted as specified */ public enum Sort: String, Codable, Equatable, CaseIterable { case lastName = "lastName" - case lastName = "-lastName" + case _lastName = "-lastName" case username = "username" - case username = "-username" + case _username = "-username" } /** the fields to include for returned resources of type users */ diff --git a/Specs/PetstoreTest/generated/Swift/Sources/Models/ClassModel.swift b/Specs/PetstoreTest/generated/Swift/Sources/Models/ClassModel.swift index 3080dea21..dcf90066c 100644 --- a/Specs/PetstoreTest/generated/Swift/Sources/Models/ClassModel.swift +++ b/Specs/PetstoreTest/generated/Swift/Sources/Models/ClassModel.swift @@ -8,27 +8,27 @@ import Foundation /** Model for testing model with "_class" property */ public class ClassModel: APIModel { - public var `class`: String? + public var _class: String? - public init(`class`: String? = nil) { - self.`class` = `class` + public init(_class: String? = nil) { + self._class = _class } public required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: StringCodingKey.self) - `class` = try container.decodeIfPresent("_class") + _class = try container.decodeIfPresent("_class") } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: StringCodingKey.self) - try container.encodeIfPresent(`class`, forKey: "_class") + try container.encodeIfPresent(_class, forKey: "_class") } public func isEqual(to object: Any?) -> Bool { guard let object = object as? ClassModel else { return false } - guard self.`class` == object.`class` else { return false } + guard self._class == object._class else { return false } return true } diff --git a/Specs/PetstoreTest/generated/Swift/Sources/Models/EnumClass.swift b/Specs/PetstoreTest/generated/Swift/Sources/Models/EnumClass.swift index e1085a61e..c21ab9797 100644 --- a/Specs/PetstoreTest/generated/Swift/Sources/Models/EnumClass.swift +++ b/Specs/PetstoreTest/generated/Swift/Sources/Models/EnumClass.swift @@ -6,7 +6,7 @@ import Foundation public enum EnumClass: String, Codable, Equatable, CaseIterable { - case abc = "_abc" - case efg = "-efg" + case _abc = "_abc" + case _efg = "-efg" case xyz = "(xyz)" } diff --git a/Specs/PetstoreTest/generated/Swift/Sources/Requests/Fake/TestEnumParameters.swift b/Specs/PetstoreTest/generated/Swift/Sources/Requests/Fake/TestEnumParameters.swift index eed984878..641a42e26 100644 --- a/Specs/PetstoreTest/generated/Swift/Sources/Requests/Fake/TestEnumParameters.swift +++ b/Specs/PetstoreTest/generated/Swift/Sources/Requests/Fake/TestEnumParameters.swift @@ -20,8 +20,8 @@ extension PetstoreTest.Fake { /** Header parameter enum test (string) */ public enum EnumHeaderString: String, Codable, Equatable, CaseIterable { - case abc = "_abc" - case efg = "-efg" + case _abc = "_abc" + case _efg = "-efg" case xyz = "(xyz)" } @@ -33,8 +33,8 @@ extension PetstoreTest.Fake { /** Query parameter enum test (string) */ public enum EnumQueryString: String, Codable, Equatable, CaseIterable { - case abc = "_abc" - case efg = "-efg" + case _abc = "_abc" + case _efg = "-efg" case xyz = "(xyz)" } @@ -46,8 +46,8 @@ extension PetstoreTest.Fake { /** Form parameter enum test (string) */ public enum EnumFormString: String, Codable, Equatable, CaseIterable { - case abc = "_abc" - case efg = "-efg" + case _abc = "_abc" + case _efg = "-efg" case xyz = "(xyz)" }