From 665a85d768f06fd3fa20d54e20407706500bb8bb Mon Sep 17 00:00:00 2001 From: Ugo Mignon <56931733+TartanLeGrand@users.noreply.github.com> Date: Mon, 12 Oct 2026 12:31:19 +0200 Subject: [PATCH 1/7] make: use perl for the Client rename in make api sed -i '' and [[:<:]] are BSD-only, so the rename step of `make api` fails on Linux with GNU sed. perl -pi and \b behave the same on both. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b40ad9ce..73b4efc2 100644 --- a/Makefile +++ b/Makefile @@ -158,7 +158,7 @@ api: openapi/openapi.json --config Sources/DeveloperAPI/openapi-generator-config.yaml \ --output-directory Sources/DeveloperAPI/Generated for file in Sources/DeveloperAPI/Generated/*.swift; do \ - sed -i '' -e 's/[[:<:]]Client[[:>:]]/DeveloperAPIClient/g' $$file; \ + perl -pi -e 's/\bClient\b/DeveloperAPIClient/g' $$file; \ done .PHONY: update-api From 2f138c37ba43fb8d35cb041bd5b51e160cb7a84c Mon Sep 17 00:00:00 2001 From: Ugo Mignon <56931733+TartanLeGrand@users.noreply.github.com> Date: Mon, 12 Oct 2026 12:31:19 +0200 Subject: [PATCH 2/7] DeveloperAPI: generate build upload operations Add buildUploads and buildUploadFiles create/get/update(/delete) so xtool can upload builds through the public App Store Connect API. The client is regenerated from the current Apple spec (4.5.1) with swift-openapi-generator 1.7.2, the version that produced the checked-in code (Package.resolved is on 1.13.1 but the output was never regenerated, which would otherwise add ~20k lines of unrelated churn). The spec drift since 4.0.0 is limited to a few schema fields and the reordering of generated types. --- Sources/DeveloperAPI/Generated/Client.swift | 1146 ++ Sources/DeveloperAPI/Generated/Types.swift | 12212 +++++++++++----- .../openapi-generator-config.yaml | 9 + 3 files changed, 9942 insertions(+), 3425 deletions(-) diff --git a/Sources/DeveloperAPI/Generated/Client.swift b/Sources/DeveloperAPI/Generated/Client.swift index 814b5b60..b6bf5b92 100644 --- a/Sources/DeveloperAPI/Generated/Client.swift +++ b/Sources/DeveloperAPI/Generated/Client.swift @@ -37,6 +37,1152 @@ public struct DeveloperAPIClient: APIProtocol { private var converter: Converter { client.converter } + /// - Remark: HTTP `POST /v1/buildUploadFiles`. + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/post(buildUploadFiles_createInstance)`. + public func buildUploadFilesCreateInstance(_ input: Operations.BuildUploadFilesCreateInstance.Input) async throws -> Operations.BuildUploadFilesCreateInstance.Output { + try await client.send( + input: input, + forOperation: Operations.BuildUploadFilesCreateInstance.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/buildUploadFiles", + parameters: [] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 201: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesCreateInstance.Output.Created.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.BuildUploadFileResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .created(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesCreateInstance.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesCreateInstance.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesCreateInstance.Output.Forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesCreateInstance.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 422: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesCreateInstance.Output.UnprocessableContent.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unprocessableContent(.init(body: body)) + case 429: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesCreateInstance.Output.TooManyRequests.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .tooManyRequests(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// - Remark: HTTP `GET /v1/buildUploadFiles/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/get(buildUploadFiles_getInstance)`. + public func buildUploadFilesGetInstance(_ input: Operations.BuildUploadFilesGetInstance.Input) async throws -> Operations.BuildUploadFilesGetInstance.Output { + try await client.send( + input: input, + forOperation: Operations.BuildUploadFilesGetInstance.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/buildUploadFiles/{}", + parameters: [ + input.path.id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: false, + name: "fields[buildUploadFiles]", + value: input.query.fields_lbrack_buildUploadFiles_rbrack_ + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesGetInstance.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.BuildUploadFileResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesGetInstance.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesGetInstance.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesGetInstance.Output.Forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesGetInstance.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 429: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesGetInstance.Output.TooManyRequests.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .tooManyRequests(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// - Remark: HTTP `PATCH /v1/buildUploadFiles/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/patch(buildUploadFiles_updateInstance)`. + public func buildUploadFilesUpdateInstance(_ input: Operations.BuildUploadFilesUpdateInstance.Input) async throws -> Operations.BuildUploadFilesUpdateInstance.Output { + try await client.send( + input: input, + forOperation: Operations.BuildUploadFilesUpdateInstance.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/buildUploadFiles/{}", + parameters: [ + input.path.id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .patch + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesUpdateInstance.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.BuildUploadFileResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesUpdateInstance.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesUpdateInstance.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesUpdateInstance.Output.Forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesUpdateInstance.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesUpdateInstance.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 422: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesUpdateInstance.Output.UnprocessableContent.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unprocessableContent(.init(body: body)) + case 429: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadFilesUpdateInstance.Output.TooManyRequests.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .tooManyRequests(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// - Remark: HTTP `POST /v1/buildUploads`. + /// - Remark: Generated from `#/paths//v1/buildUploads/post(buildUploads_createInstance)`. + public func buildUploadsCreateInstance(_ input: Operations.BuildUploadsCreateInstance.Input) async throws -> Operations.BuildUploadsCreateInstance.Output { + try await client.send( + input: input, + forOperation: Operations.BuildUploadsCreateInstance.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/buildUploads", + parameters: [] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .post + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + let body: OpenAPIRuntime.HTTPBody? + switch input.body { + case let .json(value): + body = try converter.setRequiredRequestBodyAsJSON( + value, + headerFields: &request.headerFields, + contentType: "application/json; charset=utf-8" + ) + } + return (request, body) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 201: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsCreateInstance.Output.Created.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.BuildUploadResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .created(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsCreateInstance.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsCreateInstance.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsCreateInstance.Output.Forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 409: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsCreateInstance.Output.Conflict.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .conflict(.init(body: body)) + case 422: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsCreateInstance.Output.UnprocessableContent.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unprocessableContent(.init(body: body)) + case 429: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsCreateInstance.Output.TooManyRequests.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .tooManyRequests(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// - Remark: HTTP `GET /v1/buildUploads/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/get(buildUploads_getInstance)`. + public func buildUploadsGetInstance(_ input: Operations.BuildUploadsGetInstance.Input) async throws -> Operations.BuildUploadsGetInstance.Output { + try await client.send( + input: input, + forOperation: Operations.BuildUploadsGetInstance.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/buildUploads/{}", + parameters: [ + input.path.id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .get + ) + suppressMutabilityWarning(&request) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: false, + name: "fields[buildUploads]", + value: input.query.fields_lbrack_buildUploads_rbrack_ + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: false, + name: "fields[builds]", + value: input.query.fields_lbrack_builds_rbrack_ + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: false, + name: "fields[buildUploadFiles]", + value: input.query.fields_lbrack_buildUploadFiles_rbrack_ + ) + try converter.setQueryItemAsURI( + in: &request, + style: .form, + explode: false, + name: "include", + value: input.query.include + ) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 200: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsGetInstance.Output.Ok.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.BuildUploadResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .ok(.init(body: body)) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsGetInstance.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsGetInstance.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsGetInstance.Output.Forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsGetInstance.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 429: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsGetInstance.Output.TooManyRequests.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .tooManyRequests(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } + /// - Remark: HTTP `DELETE /v1/buildUploads/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/delete(buildUploads_deleteInstance)`. + public func buildUploadsDeleteInstance(_ input: Operations.BuildUploadsDeleteInstance.Input) async throws -> Operations.BuildUploadsDeleteInstance.Output { + try await client.send( + input: input, + forOperation: Operations.BuildUploadsDeleteInstance.id, + serializer: { input in + let path = try converter.renderedPath( + template: "/v1/buildUploads/{}", + parameters: [ + input.path.id + ] + ) + var request: HTTPTypes.HTTPRequest = .init( + soar_path: path, + method: .delete + ) + suppressMutabilityWarning(&request) + converter.setAcceptHeader( + in: &request.headerFields, + contentTypes: input.headers.accept + ) + return (request, nil) + }, + deserializer: { response, responseBody in + switch response.status.code { + case 204: + return .noContent(.init()) + case 400: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsDeleteInstance.Output.BadRequest.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .badRequest(.init(body: body)) + case 401: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsDeleteInstance.Output.Unauthorized.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .unauthorized(.init(body: body)) + case 403: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsDeleteInstance.Output.Forbidden.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .forbidden(.init(body: body)) + case 404: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsDeleteInstance.Output.NotFound.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .notFound(.init(body: body)) + case 429: + let contentType = converter.extractContentTypeIfPresent(in: response.headerFields) + let body: Operations.BuildUploadsDeleteInstance.Output.TooManyRequests.Body + let chosenContentType = try converter.bestContentType( + received: contentType, + options: [ + "application/json" + ] + ) + switch chosenContentType { + case "application/json": + body = try await converter.getResponseBodyAsJSON( + Components.Schemas.ErrorResponse.self, + from: responseBody, + transforming: { value in + .json(value) + } + ) + default: + preconditionFailure("bestContentType chose an invalid content type.") + } + return .tooManyRequests(.init(body: body)) + default: + return .undocumented( + statusCode: response.status.code, + .init( + headerFields: response.headerFields, + body: responseBody + ) + ) + } + } + ) + } /// - Remark: HTTP `POST /v1/bundleIdCapabilities`. /// - Remark: Generated from `#/paths//v1/bundleIdCapabilities/post(bundleIdCapabilities_createInstance)`. public func bundleIdCapabilitiesCreateInstance(_ input: Operations.BundleIdCapabilitiesCreateInstance.Input) async throws -> Operations.BundleIdCapabilitiesCreateInstance.Output { diff --git a/Sources/DeveloperAPI/Generated/Types.swift b/Sources/DeveloperAPI/Generated/Types.swift index 0004cee9..032f5e2c 100644 --- a/Sources/DeveloperAPI/Generated/Types.swift +++ b/Sources/DeveloperAPI/Generated/Types.swift @@ -11,6 +11,24 @@ import struct Foundation.Date #endif /// A type that performs HTTP operations defined by the OpenAPI document. public protocol APIProtocol: Sendable { + /// - Remark: HTTP `POST /v1/buildUploadFiles`. + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/post(buildUploadFiles_createInstance)`. + func buildUploadFilesCreateInstance(_ input: Operations.BuildUploadFilesCreateInstance.Input) async throws -> Operations.BuildUploadFilesCreateInstance.Output + /// - Remark: HTTP `GET /v1/buildUploadFiles/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/get(buildUploadFiles_getInstance)`. + func buildUploadFilesGetInstance(_ input: Operations.BuildUploadFilesGetInstance.Input) async throws -> Operations.BuildUploadFilesGetInstance.Output + /// - Remark: HTTP `PATCH /v1/buildUploadFiles/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/patch(buildUploadFiles_updateInstance)`. + func buildUploadFilesUpdateInstance(_ input: Operations.BuildUploadFilesUpdateInstance.Input) async throws -> Operations.BuildUploadFilesUpdateInstance.Output + /// - Remark: HTTP `POST /v1/buildUploads`. + /// - Remark: Generated from `#/paths//v1/buildUploads/post(buildUploads_createInstance)`. + func buildUploadsCreateInstance(_ input: Operations.BuildUploadsCreateInstance.Input) async throws -> Operations.BuildUploadsCreateInstance.Output + /// - Remark: HTTP `GET /v1/buildUploads/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/get(buildUploads_getInstance)`. + func buildUploadsGetInstance(_ input: Operations.BuildUploadsGetInstance.Input) async throws -> Operations.BuildUploadsGetInstance.Output + /// - Remark: HTTP `DELETE /v1/buildUploads/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/delete(buildUploads_deleteInstance)`. + func buildUploadsDeleteInstance(_ input: Operations.BuildUploadsDeleteInstance.Input) async throws -> Operations.BuildUploadsDeleteInstance.Output /// - Remark: HTTP `POST /v1/bundleIdCapabilities`. /// - Remark: Generated from `#/paths//v1/bundleIdCapabilities/post(bundleIdCapabilities_createInstance)`. func bundleIdCapabilitiesCreateInstance(_ input: Operations.BundleIdCapabilitiesCreateInstance.Input) async throws -> Operations.BundleIdCapabilitiesCreateInstance.Output @@ -120,6 +138,78 @@ public protocol APIProtocol: Sendable { /// Convenience overloads for operation inputs. extension APIProtocol { + /// - Remark: HTTP `POST /v1/buildUploadFiles`. + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/post(buildUploadFiles_createInstance)`. + public func buildUploadFilesCreateInstance( + headers: Operations.BuildUploadFilesCreateInstance.Input.Headers = .init(), + body: Operations.BuildUploadFilesCreateInstance.Input.Body + ) async throws -> Operations.BuildUploadFilesCreateInstance.Output { + try await buildUploadFilesCreateInstance(Operations.BuildUploadFilesCreateInstance.Input( + headers: headers, + body: body + )) + } + /// - Remark: HTTP `GET /v1/buildUploadFiles/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/get(buildUploadFiles_getInstance)`. + public func buildUploadFilesGetInstance( + path: Operations.BuildUploadFilesGetInstance.Input.Path, + query: Operations.BuildUploadFilesGetInstance.Input.Query = .init(), + headers: Operations.BuildUploadFilesGetInstance.Input.Headers = .init() + ) async throws -> Operations.BuildUploadFilesGetInstance.Output { + try await buildUploadFilesGetInstance(Operations.BuildUploadFilesGetInstance.Input( + path: path, + query: query, + headers: headers + )) + } + /// - Remark: HTTP `PATCH /v1/buildUploadFiles/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/patch(buildUploadFiles_updateInstance)`. + public func buildUploadFilesUpdateInstance( + path: Operations.BuildUploadFilesUpdateInstance.Input.Path, + headers: Operations.BuildUploadFilesUpdateInstance.Input.Headers = .init(), + body: Operations.BuildUploadFilesUpdateInstance.Input.Body + ) async throws -> Operations.BuildUploadFilesUpdateInstance.Output { + try await buildUploadFilesUpdateInstance(Operations.BuildUploadFilesUpdateInstance.Input( + path: path, + headers: headers, + body: body + )) + } + /// - Remark: HTTP `POST /v1/buildUploads`. + /// - Remark: Generated from `#/paths//v1/buildUploads/post(buildUploads_createInstance)`. + public func buildUploadsCreateInstance( + headers: Operations.BuildUploadsCreateInstance.Input.Headers = .init(), + body: Operations.BuildUploadsCreateInstance.Input.Body + ) async throws -> Operations.BuildUploadsCreateInstance.Output { + try await buildUploadsCreateInstance(Operations.BuildUploadsCreateInstance.Input( + headers: headers, + body: body + )) + } + /// - Remark: HTTP `GET /v1/buildUploads/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/get(buildUploads_getInstance)`. + public func buildUploadsGetInstance( + path: Operations.BuildUploadsGetInstance.Input.Path, + query: Operations.BuildUploadsGetInstance.Input.Query = .init(), + headers: Operations.BuildUploadsGetInstance.Input.Headers = .init() + ) async throws -> Operations.BuildUploadsGetInstance.Output { + try await buildUploadsGetInstance(Operations.BuildUploadsGetInstance.Input( + path: path, + query: query, + headers: headers + )) + } + /// - Remark: HTTP `DELETE /v1/buildUploads/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/delete(buildUploads_deleteInstance)`. + public func buildUploadsDeleteInstance( + path: Operations.BuildUploadsDeleteInstance.Input.Path, + headers: Operations.BuildUploadsDeleteInstance.Input.Headers = .init() + ) async throws -> Operations.BuildUploadsDeleteInstance.Output { + try await buildUploadsDeleteInstance(Operations.BuildUploadsDeleteInstance.Input( + path: path, + headers: headers + )) + } /// - Remark: HTTP `POST /v1/bundleIdCapabilities`. /// - Remark: Generated from `#/paths//v1/bundleIdCapabilities/post(bundleIdCapabilities_createInstance)`. public func bundleIdCapabilitiesCreateInstance( @@ -1731,6 +1821,23 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/App/relationships/gameCenterEnabledVersions`. public var gameCenterEnabledVersions: Components.Schemas.App.RelationshipsPayload.GameCenterEnabledVersionsPayload? + /// - Remark: Generated from `#/components/schemas/App/relationships/performanceOverviews`. + public struct PerformanceOverviewsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/App/relationships/performanceOverviews/links`. + public var links: Components.Schemas.RelationshipLinks? + /// Creates a new `PerformanceOverviewsPayload`. + /// + /// - Parameters: + /// - links: + public init(links: Components.Schemas.RelationshipLinks? = nil) { + self.links = links + } + public enum CodingKeys: String, CodingKey { + case links + } + } + /// - Remark: Generated from `#/components/schemas/App/relationships/performanceOverviews`. + public var performanceOverviews: Components.Schemas.App.RelationshipsPayload.PerformanceOverviewsPayload? /// - Remark: Generated from `#/components/schemas/App/relationships/perfPowerMetrics`. public struct PerfPowerMetricsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/App/relationships/perfPowerMetrics/links`. @@ -2331,6 +2438,23 @@ public enum Components { } /// - Remark: Generated from `#/components/schemas/App/relationships/backgroundAssets`. public var backgroundAssets: Components.Schemas.App.RelationshipsPayload.BackgroundAssetsPayload? + /// - Remark: Generated from `#/components/schemas/App/relationships/assetLibrary`. + public struct AssetLibraryPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/App/relationships/assetLibrary/links`. + public var links: Components.Schemas.RelationshipLinks? + /// Creates a new `AssetLibraryPayload`. + /// + /// - Parameters: + /// - links: + public init(links: Components.Schemas.RelationshipLinks? = nil) { + self.links = links + } + public enum CodingKeys: String, CodingKey { + case links + } + } + /// - Remark: Generated from `#/components/schemas/App/relationships/assetLibrary`. + public var assetLibrary: Components.Schemas.App.RelationshipsPayload.AssetLibraryPayload? /// - Remark: Generated from `#/components/schemas/App/relationships/betaFeedbackScreenshotSubmissions`. public struct BetaFeedbackScreenshotSubmissionsPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/App/relationships/betaFeedbackScreenshotSubmissions/links`. @@ -2484,6 +2608,7 @@ public enum Components { /// - inAppPurchases: /// - subscriptionGroups: /// - gameCenterEnabledVersions: + /// - performanceOverviews: /// - perfPowerMetrics: /// - appCustomProductPages: /// - inAppPurchasesV2: @@ -2500,6 +2625,7 @@ public enum Components { /// - marketplaceSearchDetail: /// - buildUploads: /// - backgroundAssets: + /// - assetLibrary: /// - betaFeedbackScreenshotSubmissions: /// - betaFeedbackCrashSubmissions: /// - searchKeywords: @@ -2528,6 +2654,7 @@ public enum Components { inAppPurchases: Components.Schemas.App.RelationshipsPayload.InAppPurchasesPayload? = nil, subscriptionGroups: Components.Schemas.App.RelationshipsPayload.SubscriptionGroupsPayload? = nil, gameCenterEnabledVersions: Components.Schemas.App.RelationshipsPayload.GameCenterEnabledVersionsPayload? = nil, + performanceOverviews: Components.Schemas.App.RelationshipsPayload.PerformanceOverviewsPayload? = nil, perfPowerMetrics: Components.Schemas.App.RelationshipsPayload.PerfPowerMetricsPayload? = nil, appCustomProductPages: Components.Schemas.App.RelationshipsPayload.AppCustomProductPagesPayload? = nil, inAppPurchasesV2: Components.Schemas.App.RelationshipsPayload.InAppPurchasesV2Payload? = nil, @@ -2544,6 +2671,7 @@ public enum Components { marketplaceSearchDetail: Components.Schemas.App.RelationshipsPayload.MarketplaceSearchDetailPayload? = nil, buildUploads: Components.Schemas.App.RelationshipsPayload.BuildUploadsPayload? = nil, backgroundAssets: Components.Schemas.App.RelationshipsPayload.BackgroundAssetsPayload? = nil, + assetLibrary: Components.Schemas.App.RelationshipsPayload.AssetLibraryPayload? = nil, betaFeedbackScreenshotSubmissions: Components.Schemas.App.RelationshipsPayload.BetaFeedbackScreenshotSubmissionsPayload? = nil, betaFeedbackCrashSubmissions: Components.Schemas.App.RelationshipsPayload.BetaFeedbackCrashSubmissionsPayload? = nil, searchKeywords: Components.Schemas.App.RelationshipsPayload.SearchKeywordsPayload? = nil, @@ -2572,6 +2700,7 @@ public enum Components { self.inAppPurchases = inAppPurchases self.subscriptionGroups = subscriptionGroups self.gameCenterEnabledVersions = gameCenterEnabledVersions + self.performanceOverviews = performanceOverviews self.perfPowerMetrics = perfPowerMetrics self.appCustomProductPages = appCustomProductPages self.inAppPurchasesV2 = inAppPurchasesV2 @@ -2588,6 +2717,7 @@ public enum Components { self.marketplaceSearchDetail = marketplaceSearchDetail self.buildUploads = buildUploads self.backgroundAssets = backgroundAssets + self.assetLibrary = assetLibrary self.betaFeedbackScreenshotSubmissions = betaFeedbackScreenshotSubmissions self.betaFeedbackCrashSubmissions = betaFeedbackCrashSubmissions self.searchKeywords = searchKeywords @@ -2617,6 +2747,7 @@ public enum Components { case inAppPurchases case subscriptionGroups case gameCenterEnabledVersions + case performanceOverviews case perfPowerMetrics case appCustomProductPages case inAppPurchasesV2 @@ -2633,6 +2764,7 @@ public enum Components { case marketplaceSearchDetail case buildUploads case backgroundAssets + case assetLibrary case betaFeedbackScreenshotSubmissions case betaFeedbackCrashSubmissions case searchKeywords @@ -2673,44 +2805,188 @@ public enum Components { case links } } - /// - Remark: Generated from `#/components/schemas/BundleIdCapability`. - public struct BundleIdCapability: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapability/type`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFile`. + public struct BuildUploadFile: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/type`. @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case bundleIdCapabilities = "bundleIdCapabilities" + case buildUploadFiles = "buildUploadFiles" } - /// - Remark: Generated from `#/components/schemas/BundleIdCapability/type`. - public var _type: Components.Schemas.BundleIdCapability._TypePayload - /// - Remark: Generated from `#/components/schemas/BundleIdCapability/id`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/type`. + public var _type: Components.Schemas.BuildUploadFile._TypePayload + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/id`. public var id: Swift.String - /// - Remark: Generated from `#/components/schemas/BundleIdCapability/attributes`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes`. public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapability/attributes/capabilityType`. - public var capabilityType: Components.Schemas.CapabilityType? - /// - Remark: Generated from `#/components/schemas/BundleIdCapability/attributes/settings`. - public var settings: [Components.Schemas.CapabilitySetting]? + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/assetDeliveryState`. + public var assetDeliveryState: Components.Schemas.AppMediaAssetState? + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/assetToken`. + public var assetToken: Swift.String? + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/assetType`. + public struct AssetTypePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/assetType/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case asset = "ASSET" + case assetDescription = "ASSET_DESCRIPTION" + case assetSpi = "ASSET_SPI" + } + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/assetType/value1`. + public var value1: Components.Schemas.BuildUploadFile.AttributesPayload.AssetTypePayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/assetType/value2`. + public var value2: Swift.String? + /// Creates a new `AssetTypePayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.BuildUploadFile.AttributesPayload.AssetTypePayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/assetType`. + public var assetType: Components.Schemas.BuildUploadFile.AttributesPayload.AssetTypePayload? + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/fileName`. + public var fileName: Swift.String? + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/fileSize`. + public var fileSize: Swift.Int64? + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/sourceFileChecksums`. + public var sourceFileChecksums: Components.Schemas.Checksums? + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/uploadOperations`. + public var uploadOperations: [Components.Schemas.DeliveryFileUploadOperation]? + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/uti`. + public struct UtiPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/uti/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case com_apple_binaryPropertyList = "com.apple.binary-property-list" + case com_apple_ipa = "com.apple.ipa" + case com_apple_pkg = "com.apple.pkg" + case com_apple_xmlPropertyList = "com.apple.xml-property-list" + case com_pkware_zipArchive = "com.pkware.zip-archive" + } + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/uti/value1`. + public var value1: Components.Schemas.BuildUploadFile.AttributesPayload.UtiPayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/uti/value2`. + public var value2: Swift.String? + /// Creates a new `UtiPayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.BuildUploadFile.AttributesPayload.UtiPayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes/uti`. + public var uti: Components.Schemas.BuildUploadFile.AttributesPayload.UtiPayload? /// Creates a new `AttributesPayload`. /// /// - Parameters: - /// - capabilityType: - /// - settings: + /// - assetDeliveryState: + /// - assetToken: + /// - assetType: + /// - fileName: + /// - fileSize: + /// - sourceFileChecksums: + /// - uploadOperations: + /// - uti: public init( - capabilityType: Components.Schemas.CapabilityType? = nil, - settings: [Components.Schemas.CapabilitySetting]? = nil + assetDeliveryState: Components.Schemas.AppMediaAssetState? = nil, + assetToken: Swift.String? = nil, + assetType: Components.Schemas.BuildUploadFile.AttributesPayload.AssetTypePayload? = nil, + fileName: Swift.String? = nil, + fileSize: Swift.Int64? = nil, + sourceFileChecksums: Components.Schemas.Checksums? = nil, + uploadOperations: [Components.Schemas.DeliveryFileUploadOperation]? = nil, + uti: Components.Schemas.BuildUploadFile.AttributesPayload.UtiPayload? = nil ) { - self.capabilityType = capabilityType - self.settings = settings + self.assetDeliveryState = assetDeliveryState + self.assetToken = assetToken + self.assetType = assetType + self.fileName = fileName + self.fileSize = fileSize + self.sourceFileChecksums = sourceFileChecksums + self.uploadOperations = uploadOperations + self.uti = uti } public enum CodingKeys: String, CodingKey { - case capabilityType - case settings - } - } - /// - Remark: Generated from `#/components/schemas/BundleIdCapability/attributes`. - public var attributes: Components.Schemas.BundleIdCapability.AttributesPayload? - /// - Remark: Generated from `#/components/schemas/BundleIdCapability/links`. + case assetDeliveryState + case assetToken + case assetType + case fileName + case fileSize + case sourceFileChecksums + case uploadOperations + case uti + } + } + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/attributes`. + public var attributes: Components.Schemas.BuildUploadFile.AttributesPayload? + /// - Remark: Generated from `#/components/schemas/BuildUploadFile/links`. public var links: Components.Schemas.ResourceLinks? - /// Creates a new `BundleIdCapability`. + /// Creates a new `BuildUploadFile`. /// /// - Parameters: /// - _type: @@ -2718,9 +2994,9 @@ public enum Components { /// - attributes: /// - links: public init( - _type: Components.Schemas.BundleIdCapability._TypePayload, + _type: Components.Schemas.BuildUploadFile._TypePayload, id: Swift.String, - attributes: Components.Schemas.BundleIdCapability.AttributesPayload? = nil, + attributes: Components.Schemas.BuildUploadFile.AttributesPayload? = nil, links: Components.Schemas.ResourceLinks? = nil ) { self._type = _type @@ -2735,19 +3011,19 @@ public enum Components { case links } } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityResponse`. - public struct BundleIdCapabilityResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityResponse/data`. - public var data: Components.Schemas.BundleIdCapability - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityResponse/links`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFileResponse`. + public struct BuildUploadFileResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadFileResponse/data`. + public var data: Components.Schemas.BuildUploadFile + /// - Remark: Generated from `#/components/schemas/BuildUploadFileResponse/links`. public var links: Components.Schemas.DocumentLinks - /// Creates a new `BundleIdCapabilityResponse`. + /// Creates a new `BuildUploadFileResponse`. /// /// - Parameters: /// - data: /// - links: public init( - data: Components.Schemas.BundleIdCapability, + data: Components.Schemas.BuildUploadFile, links: Components.Schemas.DocumentLinks ) { self.data = data @@ -2758,107 +3034,183 @@ public enum Components { case links } } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest`. - public struct BundleIdCapabilityCreateRequest: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest`. + public struct BuildUploadFileCreateRequest: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data`. public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/type`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/type`. @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case bundleIdCapabilities = "bundleIdCapabilities" + case buildUploadFiles = "buildUploadFiles" } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/type`. - public var _type: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/attributes`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/type`. + public var _type: Components.Schemas.BuildUploadFileCreateRequest.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/attributes`. public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/attributes/capabilityType`. - public var capabilityType: Components.Schemas.CapabilityType - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/attributes/settings`. - public var settings: [Components.Schemas.CapabilitySetting]? - /// Creates a new `AttributesPayload`. - /// - /// - Parameters: - /// - capabilityType: - /// - settings: - public init( - capabilityType: Components.Schemas.CapabilityType, - settings: [Components.Schemas.CapabilitySetting]? = nil - ) { - self.capabilityType = capabilityType - self.settings = settings - } - public enum CodingKeys: String, CodingKey { - case capabilityType - case settings - } - } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/attributes`. - public var attributes: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.AttributesPayload - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships`. - public struct RelationshipsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/bundleId`. - public struct BundleIdPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/bundleId/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/bundleId/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case bundleIds = "bundleIds" - } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/bundleId/data/type`. - public var _type: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/bundleId/data/id`. - public var id: Swift.String - /// Creates a new `DataPayload`. - /// - /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload._TypePayload, - id: Swift.String - ) { - self._type = _type - self.id = id - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id - } + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/attributes/assetType`. + public struct AssetTypePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/attributes/assetType/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case asset = "ASSET" + case assetDescription = "ASSET_DESCRIPTION" + case assetSpi = "ASSET_SPI" } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/bundleId/data`. - public var data: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload - /// Creates a new `BundleIdPayload`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/attributes/assetType/value1`. + public var value1: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.AttributesPayload.AssetTypePayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/attributes/assetType/value2`. + public var value2: Swift.String? + /// Creates a new `AssetTypePayload`. /// /// - Parameters: - /// - data: - public init(data: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload) { - self.data = data - } - public enum CodingKeys: String, CodingKey { - case data + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.AttributesPayload.AssetTypePayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 } - } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/bundleId`. - public var bundleId: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/capability`. - public struct CapabilityPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/capability/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/capability/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case capabilities = "capabilities" + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/capability/data/type`. - public var _type: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.CapabilityPayload.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/capability/data/id`. - public var id: Components.Schemas.CapabilityType + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/attributes/assetType`. + public var assetType: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.AttributesPayload.AssetTypePayload + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/attributes/fileName`. + public var fileName: Swift.String + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/attributes/fileSize`. + public var fileSize: Swift.Int64 + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/attributes/uti`. + public struct UtiPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/attributes/uti/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case com_apple_binaryPropertyList = "com.apple.binary-property-list" + case com_apple_ipa = "com.apple.ipa" + case com_apple_pkg = "com.apple.pkg" + case com_apple_xmlPropertyList = "com.apple.xml-property-list" + case com_pkware_zipArchive = "com.pkware.zip-archive" + } + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/attributes/uti/value1`. + public var value1: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.AttributesPayload.UtiPayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/attributes/uti/value2`. + public var value2: Swift.String? + /// Creates a new `UtiPayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.AttributesPayload.UtiPayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/attributes/uti`. + public var uti: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.AttributesPayload.UtiPayload + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - assetType: + /// - fileName: + /// - fileSize: + /// - uti: + public init( + assetType: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.AttributesPayload.AssetTypePayload, + fileName: Swift.String, + fileSize: Swift.Int64, + uti: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.AttributesPayload.UtiPayload + ) { + self.assetType = assetType + self.fileName = fileName + self.fileSize = fileSize + self.uti = uti + } + public enum CodingKeys: String, CodingKey { + case assetType + case fileName + case fileSize + case uti + } + } + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/attributes`. + public var attributes: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.AttributesPayload + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/relationships`. + public struct RelationshipsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/relationships/buildUpload`. + public struct BuildUploadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/relationships/buildUpload/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/relationships/buildUpload/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case buildUploads = "buildUploads" + } + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/relationships/buildUpload/data/type`. + public var _type: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.RelationshipsPayload.BuildUploadPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/relationships/buildUpload/data/id`. + public var id: Swift.String /// Creates a new `DataPayload`. /// /// - Parameters: /// - _type: /// - id: public init( - _type: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.CapabilityPayload.DataPayload._TypePayload, - id: Components.Schemas.CapabilityType + _type: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.RelationshipsPayload.BuildUploadPayload.DataPayload._TypePayload, + id: Swift.String ) { self._type = _type self.id = id @@ -2868,40 +3220,34 @@ public enum Components { case id } } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/capability/data`. - public var data: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.CapabilityPayload.DataPayload - /// Creates a new `CapabilityPayload`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/relationships/buildUpload/data`. + public var data: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.RelationshipsPayload.BuildUploadPayload.DataPayload + /// Creates a new `BuildUploadPayload`. /// /// - Parameters: /// - data: - public init(data: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.CapabilityPayload.DataPayload) { + public init(data: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.RelationshipsPayload.BuildUploadPayload.DataPayload) { self.data = data } public enum CodingKeys: String, CodingKey { case data } } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/capability`. - public var capability: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.CapabilityPayload? + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/relationships/buildUpload`. + public var buildUpload: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.RelationshipsPayload.BuildUploadPayload /// Creates a new `RelationshipsPayload`. /// /// - Parameters: - /// - bundleId: - /// - capability: - public init( - bundleId: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload, - capability: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.CapabilityPayload? = nil - ) { - self.bundleId = bundleId - self.capability = capability + /// - buildUpload: + public init(buildUpload: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.RelationshipsPayload.BuildUploadPayload) { + self.buildUpload = buildUpload } public enum CodingKeys: String, CodingKey { - case bundleId - case capability + case buildUpload } } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships`. - public var relationships: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data/relationships`. + public var relationships: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.RelationshipsPayload /// Creates a new `DataPayload`. /// /// - Parameters: @@ -2909,9 +3255,9 @@ public enum Components { /// - attributes: /// - relationships: public init( - _type: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload._TypePayload, - attributes: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.AttributesPayload, - relationships: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload + _type: Components.Schemas.BuildUploadFileCreateRequest.DataPayload._TypePayload, + attributes: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.AttributesPayload, + relationships: Components.Schemas.BuildUploadFileCreateRequest.DataPayload.RelationshipsPayload ) { self._type = _type self.attributes = attributes @@ -2923,56 +3269,56 @@ public enum Components { case relationships } } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data`. - public var data: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload - /// Creates a new `BundleIdCapabilityCreateRequest`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFileCreateRequest/data`. + public var data: Components.Schemas.BuildUploadFileCreateRequest.DataPayload + /// Creates a new `BuildUploadFileCreateRequest`. /// /// - Parameters: /// - data: - public init(data: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload) { + public init(data: Components.Schemas.BuildUploadFileCreateRequest.DataPayload) { self.data = data } public enum CodingKeys: String, CodingKey { case data } } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest`. - public struct BundleIdCapabilityUpdateRequest: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFileUpdateRequest`. + public struct BuildUploadFileUpdateRequest: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadFileUpdateRequest/data`. public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data/type`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFileUpdateRequest/data/type`. @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case bundleIdCapabilities = "bundleIdCapabilities" + case buildUploadFiles = "buildUploadFiles" } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data/type`. - public var _type: Components.Schemas.BundleIdCapabilityUpdateRequest.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data/id`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFileUpdateRequest/data/type`. + public var _type: Components.Schemas.BuildUploadFileUpdateRequest.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BuildUploadFileUpdateRequest/data/id`. public var id: Swift.String - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data/attributes`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFileUpdateRequest/data/attributes`. public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data/attributes/capabilityType`. - public var capabilityType: Components.Schemas.CapabilityType? - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data/attributes/settings`. - public var settings: [Components.Schemas.CapabilitySetting]? + /// - Remark: Generated from `#/components/schemas/BuildUploadFileUpdateRequest/data/attributes/sourceFileChecksums`. + public var sourceFileChecksums: Components.Schemas.Checksums? + /// - Remark: Generated from `#/components/schemas/BuildUploadFileUpdateRequest/data/attributes/uploaded`. + public var uploaded: Swift.Bool? /// Creates a new `AttributesPayload`. /// /// - Parameters: - /// - capabilityType: - /// - settings: + /// - sourceFileChecksums: + /// - uploaded: public init( - capabilityType: Components.Schemas.CapabilityType? = nil, - settings: [Components.Schemas.CapabilitySetting]? = nil + sourceFileChecksums: Components.Schemas.Checksums? = nil, + uploaded: Swift.Bool? = nil ) { - self.capabilityType = capabilityType - self.settings = settings + self.sourceFileChecksums = sourceFileChecksums + self.uploaded = uploaded } public enum CodingKeys: String, CodingKey { - case capabilityType - case settings + case sourceFileChecksums + case uploaded } } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data/attributes`. - public var attributes: Components.Schemas.BundleIdCapabilityUpdateRequest.DataPayload.AttributesPayload? + /// - Remark: Generated from `#/components/schemas/BuildUploadFileUpdateRequest/data/attributes`. + public var attributes: Components.Schemas.BuildUploadFileUpdateRequest.DataPayload.AttributesPayload? /// Creates a new `DataPayload`. /// /// - Parameters: @@ -2980,9 +3326,9 @@ public enum Components { /// - id: /// - attributes: public init( - _type: Components.Schemas.BundleIdCapabilityUpdateRequest.DataPayload._TypePayload, + _type: Components.Schemas.BuildUploadFileUpdateRequest.DataPayload._TypePayload, id: Swift.String, - attributes: Components.Schemas.BundleIdCapabilityUpdateRequest.DataPayload.AttributesPayload? = nil + attributes: Components.Schemas.BuildUploadFileUpdateRequest.DataPayload.AttributesPayload? = nil ) { self._type = _type self.id = id @@ -2994,91 +3340,134 @@ public enum Components { case attributes } } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data`. - public var data: Components.Schemas.BundleIdCapabilityUpdateRequest.DataPayload - /// Creates a new `BundleIdCapabilityUpdateRequest`. + /// - Remark: Generated from `#/components/schemas/BuildUploadFileUpdateRequest/data`. + public var data: Components.Schemas.BuildUploadFileUpdateRequest.DataPayload + /// Creates a new `BuildUploadFileUpdateRequest`. /// /// - Parameters: /// - data: - public init(data: Components.Schemas.BundleIdCapabilityUpdateRequest.DataPayload) { + public init(data: Components.Schemas.BuildUploadFileUpdateRequest.DataPayload) { self.data = data } public enum CodingKeys: String, CodingKey { case data } } - /// - Remark: Generated from `#/components/schemas/BundleId`. - public struct BundleId: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleId/type`. + /// - Remark: Generated from `#/components/schemas/BuildUpload`. + public struct BuildUpload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUpload/type`. @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case bundleIds = "bundleIds" + case buildUploads = "buildUploads" } - /// - Remark: Generated from `#/components/schemas/BundleId/type`. - public var _type: Components.Schemas.BundleId._TypePayload - /// - Remark: Generated from `#/components/schemas/BundleId/id`. + /// - Remark: Generated from `#/components/schemas/BuildUpload/type`. + public var _type: Components.Schemas.BuildUpload._TypePayload + /// - Remark: Generated from `#/components/schemas/BuildUpload/id`. public var id: Swift.String - /// - Remark: Generated from `#/components/schemas/BundleId/attributes`. + /// - Remark: Generated from `#/components/schemas/BuildUpload/attributes`. public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleId/attributes/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/BundleId/attributes/platform`. - public var platform: Components.Schemas.BundleIdPlatform? - /// - Remark: Generated from `#/components/schemas/BundleId/attributes/identifier`. - public var identifier: Swift.String? - /// - Remark: Generated from `#/components/schemas/BundleId/attributes/seedId`. - public var seedId: Swift.String? + /// - Remark: Generated from `#/components/schemas/BuildUpload/attributes/cfBundleShortVersionString`. + public var cfBundleShortVersionString: Swift.String? + /// - Remark: Generated from `#/components/schemas/BuildUpload/attributes/cfBundleVersion`. + public var cfBundleVersion: Swift.String? + /// - Remark: Generated from `#/components/schemas/BuildUpload/attributes/createdDate`. + public var createdDate: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/BuildUpload/attributes/state`. + public struct StatePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUpload/attributes/state/errors`. + public var errors: [Components.Schemas.StateDetail]? + /// - Remark: Generated from `#/components/schemas/BuildUpload/attributes/state/warnings`. + public var warnings: [Components.Schemas.StateDetail]? + /// - Remark: Generated from `#/components/schemas/BuildUpload/attributes/state/infos`. + public var infos: [Components.Schemas.StateDetail]? + /// - Remark: Generated from `#/components/schemas/BuildUpload/attributes/state/state`. + public var state: Components.Schemas.BuildUploadState? + /// Creates a new `StatePayload`. + /// + /// - Parameters: + /// - errors: + /// - warnings: + /// - infos: + /// - state: + public init( + errors: [Components.Schemas.StateDetail]? = nil, + warnings: [Components.Schemas.StateDetail]? = nil, + infos: [Components.Schemas.StateDetail]? = nil, + state: Components.Schemas.BuildUploadState? = nil + ) { + self.errors = errors + self.warnings = warnings + self.infos = infos + self.state = state + } + public enum CodingKeys: String, CodingKey { + case errors + case warnings + case infos + case state + } + } + /// - Remark: Generated from `#/components/schemas/BuildUpload/attributes/state`. + public var state: Components.Schemas.BuildUpload.AttributesPayload.StatePayload? + /// - Remark: Generated from `#/components/schemas/BuildUpload/attributes/platform`. + public var platform: Components.Schemas.Platform? + /// - Remark: Generated from `#/components/schemas/BuildUpload/attributes/uploadedDate`. + public var uploadedDate: Foundation.Date? /// Creates a new `AttributesPayload`. /// /// - Parameters: - /// - name: + /// - cfBundleShortVersionString: + /// - cfBundleVersion: + /// - createdDate: + /// - state: /// - platform: - /// - identifier: - /// - seedId: + /// - uploadedDate: public init( - name: Swift.String? = nil, - platform: Components.Schemas.BundleIdPlatform? = nil, - identifier: Swift.String? = nil, - seedId: Swift.String? = nil + cfBundleShortVersionString: Swift.String? = nil, + cfBundleVersion: Swift.String? = nil, + createdDate: Foundation.Date? = nil, + state: Components.Schemas.BuildUpload.AttributesPayload.StatePayload? = nil, + platform: Components.Schemas.Platform? = nil, + uploadedDate: Foundation.Date? = nil ) { - self.name = name + self.cfBundleShortVersionString = cfBundleShortVersionString + self.cfBundleVersion = cfBundleVersion + self.createdDate = createdDate + self.state = state self.platform = platform - self.identifier = identifier - self.seedId = seedId + self.uploadedDate = uploadedDate } public enum CodingKeys: String, CodingKey { - case name + case cfBundleShortVersionString + case cfBundleVersion + case createdDate + case state case platform - case identifier - case seedId + case uploadedDate } } - /// - Remark: Generated from `#/components/schemas/BundleId/attributes`. - public var attributes: Components.Schemas.BundleId.AttributesPayload? - /// - Remark: Generated from `#/components/schemas/BundleId/relationships`. + /// - Remark: Generated from `#/components/schemas/BuildUpload/attributes`. + public var attributes: Components.Schemas.BuildUpload.AttributesPayload? + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships`. public struct RelationshipsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles`. - public struct ProfilesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/links`. - public var links: Components.Schemas.RelationshipLinks? - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/meta`. - public var meta: Components.Schemas.PagingInformation? - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/DataPayload`. - public struct DataPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/DataPayload/type`. + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/build`. + public struct BuildPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/build/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/build/data/type`. @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case profiles = "profiles" + case builds = "builds" } - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/DataPayload/type`. - public var _type: Components.Schemas.BundleId.RelationshipsPayload.ProfilesPayload.DataPayloadPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/DataPayload/id`. + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/build/data/type`. + public var _type: Components.Schemas.BuildUpload.RelationshipsPayload.BuildPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/build/data/id`. public var id: Swift.String - /// Creates a new `DataPayloadPayload`. + /// Creates a new `DataPayload`. /// /// - Parameters: /// - _type: /// - id: public init( - _type: Components.Schemas.BundleId.RelationshipsPayload.ProfilesPayload.DataPayloadPayload._TypePayload, + _type: Components.Schemas.BuildUpload.RelationshipsPayload.BuildPayload.DataPayload._TypePayload, id: Swift.String ) { self._type = _type @@ -3089,56 +3478,40 @@ public enum Components { case id } } - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/data`. - public typealias DataPayload = [Components.Schemas.BundleId.RelationshipsPayload.ProfilesPayload.DataPayloadPayload] - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/data`. - public var data: Components.Schemas.BundleId.RelationshipsPayload.ProfilesPayload.DataPayload? - /// Creates a new `ProfilesPayload`. + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/build/data`. + public var data: Components.Schemas.BuildUpload.RelationshipsPayload.BuildPayload.DataPayload? + /// Creates a new `BuildPayload`. /// /// - Parameters: - /// - links: - /// - meta: /// - data: - public init( - links: Components.Schemas.RelationshipLinks? = nil, - meta: Components.Schemas.PagingInformation? = nil, - data: Components.Schemas.BundleId.RelationshipsPayload.ProfilesPayload.DataPayload? = nil - ) { - self.links = links - self.meta = meta + public init(data: Components.Schemas.BuildUpload.RelationshipsPayload.BuildPayload.DataPayload? = nil) { self.data = data } public enum CodingKeys: String, CodingKey { - case links - case meta case data } } - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles`. - public var profiles: Components.Schemas.BundleId.RelationshipsPayload.ProfilesPayload? - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities`. - public struct BundleIdCapabilitiesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/links`. - public var links: Components.Schemas.RelationshipLinks? - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/meta`. - public var meta: Components.Schemas.PagingInformation? - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/DataPayload`. - public struct DataPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/DataPayload/type`. + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/build`. + public var build: Components.Schemas.BuildUpload.RelationshipsPayload.BuildPayload? + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetFile`. + public struct AssetFilePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetFile/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetFile/data/type`. @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case bundleIdCapabilities = "bundleIdCapabilities" + case buildUploadFiles = "buildUploadFiles" } - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/DataPayload/type`. - public var _type: Components.Schemas.BundleId.RelationshipsPayload.BundleIdCapabilitiesPayload.DataPayloadPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/DataPayload/id`. + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetFile/data/type`. + public var _type: Components.Schemas.BuildUpload.RelationshipsPayload.AssetFilePayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetFile/data/id`. public var id: Swift.String - /// Creates a new `DataPayloadPayload`. + /// Creates a new `DataPayload`. /// /// - Parameters: /// - _type: /// - id: public init( - _type: Components.Schemas.BundleId.RelationshipsPayload.BundleIdCapabilitiesPayload.DataPayloadPayload._TypePayload, + _type: Components.Schemas.BuildUpload.RelationshipsPayload.AssetFilePayload.DataPayload._TypePayload, id: Swift.String ) { self._type = _type @@ -3149,46 +3522,32 @@ public enum Components { case id } } - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/data`. - public typealias DataPayload = [Components.Schemas.BundleId.RelationshipsPayload.BundleIdCapabilitiesPayload.DataPayloadPayload] - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/data`. - public var data: Components.Schemas.BundleId.RelationshipsPayload.BundleIdCapabilitiesPayload.DataPayload? - /// Creates a new `BundleIdCapabilitiesPayload`. + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetFile/data`. + public var data: Components.Schemas.BuildUpload.RelationshipsPayload.AssetFilePayload.DataPayload? + /// Creates a new `AssetFilePayload`. /// /// - Parameters: - /// - links: - /// - meta: /// - data: - public init( - links: Components.Schemas.RelationshipLinks? = nil, - meta: Components.Schemas.PagingInformation? = nil, - data: Components.Schemas.BundleId.RelationshipsPayload.BundleIdCapabilitiesPayload.DataPayload? = nil - ) { - self.links = links - self.meta = meta + public init(data: Components.Schemas.BuildUpload.RelationshipsPayload.AssetFilePayload.DataPayload? = nil) { self.data = data } public enum CodingKeys: String, CodingKey { - case links - case meta case data } } - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities`. - public var bundleIdCapabilities: Components.Schemas.BundleId.RelationshipsPayload.BundleIdCapabilitiesPayload? - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app`. - public struct AppPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app/links`. - public var links: Components.Schemas.RelationshipLinks? - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app/data`. + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetFile`. + public var assetFile: Components.Schemas.BuildUpload.RelationshipsPayload.AssetFilePayload? + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetDescriptionFile`. + public struct AssetDescriptionFilePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetDescriptionFile/data`. public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app/data/type`. + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetDescriptionFile/data/type`. @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case apps = "apps" + case buildUploadFiles = "buildUploadFiles" } - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app/data/type`. - public var _type: Components.Schemas.BundleId.RelationshipsPayload.AppPayload.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app/data/id`. + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetDescriptionFile/data/type`. + public var _type: Components.Schemas.BuildUpload.RelationshipsPayload.AssetDescriptionFilePayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetDescriptionFile/data/id`. public var id: Swift.String /// Creates a new `DataPayload`. /// @@ -3196,7 +3555,7 @@ public enum Components { /// - _type: /// - id: public init( - _type: Components.Schemas.BundleId.RelationshipsPayload.AppPayload.DataPayload._TypePayload, + _type: Components.Schemas.BuildUpload.RelationshipsPayload.AssetDescriptionFilePayload.DataPayload._TypePayload, id: Swift.String ) { self._type = _type @@ -3207,53 +3566,116 @@ public enum Components { case id } } - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app/data`. - public var data: Components.Schemas.BundleId.RelationshipsPayload.AppPayload.DataPayload? - /// Creates a new `AppPayload`. + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetDescriptionFile/data`. + public var data: Components.Schemas.BuildUpload.RelationshipsPayload.AssetDescriptionFilePayload.DataPayload? + /// Creates a new `AssetDescriptionFilePayload`. /// /// - Parameters: - /// - links: /// - data: - public init( - links: Components.Schemas.RelationshipLinks? = nil, - data: Components.Schemas.BundleId.RelationshipsPayload.AppPayload.DataPayload? = nil - ) { - self.links = links + public init(data: Components.Schemas.BuildUpload.RelationshipsPayload.AssetDescriptionFilePayload.DataPayload? = nil) { self.data = data } public enum CodingKeys: String, CodingKey { - case links case data } } - /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app`. - public var app: Components.Schemas.BundleId.RelationshipsPayload.AppPayload? + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetDescriptionFile`. + public var assetDescriptionFile: Components.Schemas.BuildUpload.RelationshipsPayload.AssetDescriptionFilePayload? + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetSpiFile`. + public struct AssetSpiFilePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetSpiFile/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetSpiFile/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case buildUploadFiles = "buildUploadFiles" + } + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetSpiFile/data/type`. + public var _type: Components.Schemas.BuildUpload.RelationshipsPayload.AssetSpiFilePayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetSpiFile/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.BuildUpload.RelationshipsPayload.AssetSpiFilePayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetSpiFile/data`. + public var data: Components.Schemas.BuildUpload.RelationshipsPayload.AssetSpiFilePayload.DataPayload? + /// Creates a new `AssetSpiFilePayload`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.BuildUpload.RelationshipsPayload.AssetSpiFilePayload.DataPayload? = nil) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/assetSpiFile`. + public var assetSpiFile: Components.Schemas.BuildUpload.RelationshipsPayload.AssetSpiFilePayload? + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/buildUploadFiles`. + public struct BuildUploadFilesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/buildUploadFiles/links`. + public var links: Components.Schemas.RelationshipLinks? + /// Creates a new `BuildUploadFilesPayload`. + /// + /// - Parameters: + /// - links: + public init(links: Components.Schemas.RelationshipLinks? = nil) { + self.links = links + } + public enum CodingKeys: String, CodingKey { + case links + } + } + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships/buildUploadFiles`. + public var buildUploadFiles: Components.Schemas.BuildUpload.RelationshipsPayload.BuildUploadFilesPayload? /// Creates a new `RelationshipsPayload`. /// /// - Parameters: - /// - profiles: - /// - bundleIdCapabilities: - /// - app: + /// - build: + /// - assetFile: + /// - assetDescriptionFile: + /// - assetSpiFile: + /// - buildUploadFiles: public init( - profiles: Components.Schemas.BundleId.RelationshipsPayload.ProfilesPayload? = nil, - bundleIdCapabilities: Components.Schemas.BundleId.RelationshipsPayload.BundleIdCapabilitiesPayload? = nil, - app: Components.Schemas.BundleId.RelationshipsPayload.AppPayload? = nil + build: Components.Schemas.BuildUpload.RelationshipsPayload.BuildPayload? = nil, + assetFile: Components.Schemas.BuildUpload.RelationshipsPayload.AssetFilePayload? = nil, + assetDescriptionFile: Components.Schemas.BuildUpload.RelationshipsPayload.AssetDescriptionFilePayload? = nil, + assetSpiFile: Components.Schemas.BuildUpload.RelationshipsPayload.AssetSpiFilePayload? = nil, + buildUploadFiles: Components.Schemas.BuildUpload.RelationshipsPayload.BuildUploadFilesPayload? = nil ) { - self.profiles = profiles - self.bundleIdCapabilities = bundleIdCapabilities - self.app = app + self.build = build + self.assetFile = assetFile + self.assetDescriptionFile = assetDescriptionFile + self.assetSpiFile = assetSpiFile + self.buildUploadFiles = buildUploadFiles } public enum CodingKeys: String, CodingKey { - case profiles - case bundleIdCapabilities - case app + case build + case assetFile + case assetDescriptionFile + case assetSpiFile + case buildUploadFiles } } - /// - Remark: Generated from `#/components/schemas/BundleId/relationships`. - public var relationships: Components.Schemas.BundleId.RelationshipsPayload? - /// - Remark: Generated from `#/components/schemas/BundleId/links`. + /// - Remark: Generated from `#/components/schemas/BuildUpload/relationships`. + public var relationships: Components.Schemas.BuildUpload.RelationshipsPayload? + /// - Remark: Generated from `#/components/schemas/BuildUpload/links`. public var links: Components.Schemas.ResourceLinks? - /// Creates a new `BundleId`. + /// Creates a new `BuildUpload`. /// /// - Parameters: /// - _type: @@ -3262,10 +3684,10 @@ public enum Components { /// - relationships: /// - links: public init( - _type: Components.Schemas.BundleId._TypePayload, + _type: Components.Schemas.BuildUpload._TypePayload, id: Swift.String, - attributes: Components.Schemas.BundleId.AttributesPayload? = nil, - relationships: Components.Schemas.BundleId.RelationshipsPayload? = nil, + attributes: Components.Schemas.BuildUpload.AttributesPayload? = nil, + relationships: Components.Schemas.BuildUpload.RelationshipsPayload? = nil, links: Components.Schemas.ResourceLinks? = nil ) { self._type = _type @@ -3282,98 +3704,16 @@ public enum Components { case links } } - /// - Remark: Generated from `#/components/schemas/BundleIdsResponse`. - public struct BundleIdsResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/data`. - public var data: [Components.Schemas.BundleId] - /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/IncludedPayload`. - @frozen public enum IncludedPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/IncludedPayload/App`. - case apps(Components.Schemas.App) - /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/IncludedPayload/BundleIdCapability`. - case bundleIdCapabilities(Components.Schemas.BundleIdCapability) - /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/IncludedPayload/Profile`. - case profiles(Components.Schemas.Profile) - public enum CodingKeys: String, CodingKey { - case _type = "type" - } - public init(from decoder: any Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - let discriminator = try container.decode( - Swift.String.self, - forKey: ._type - ) - switch discriminator { - case "apps": - self = .apps(try .init(from: decoder)) - case "bundleIdCapabilities": - self = .bundleIdCapabilities(try .init(from: decoder)) - case "profiles": - self = .profiles(try .init(from: decoder)) - default: - throw Swift.DecodingError.unknownOneOfDiscriminator( - discriminatorKey: CodingKeys._type, - discriminatorValue: discriminator, - codingPath: decoder.codingPath - ) - } - } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .apps(value): - try value.encode(to: encoder) - case let .bundleIdCapabilities(value): - try value.encode(to: encoder) - case let .profiles(value): - try value.encode(to: encoder) - } - } - } - /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/included`. - public typealias IncludedPayload = [Components.Schemas.BundleIdsResponse.IncludedPayloadPayload] - /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/included`. - public var included: Components.Schemas.BundleIdsResponse.IncludedPayload? - /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/links`. - public var links: Components.Schemas.PagedDocumentLinks - /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/meta`. - public var meta: Components.Schemas.PagingInformation? - /// Creates a new `BundleIdsResponse`. - /// - /// - Parameters: - /// - data: - /// - included: - /// - links: - /// - meta: - public init( - data: [Components.Schemas.BundleId], - included: Components.Schemas.BundleIdsResponse.IncludedPayload? = nil, - links: Components.Schemas.PagedDocumentLinks, - meta: Components.Schemas.PagingInformation? = nil - ) { - self.data = data - self.included = included - self.links = links - self.meta = meta - } - public enum CodingKeys: String, CodingKey { - case data - case included - case links - case meta - } - } - /// - Remark: Generated from `#/components/schemas/BundleIdResponse`. - public struct BundleIdResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdResponse/data`. - public var data: Components.Schemas.BundleId - /// - Remark: Generated from `#/components/schemas/BundleIdResponse/IncludedPayload`. + /// - Remark: Generated from `#/components/schemas/BuildUploadResponse`. + public struct BuildUploadResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadResponse/data`. + public var data: Components.Schemas.BuildUpload + /// - Remark: Generated from `#/components/schemas/BuildUploadResponse/IncludedPayload`. @frozen public enum IncludedPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdResponse/IncludedPayload/App`. - case apps(Components.Schemas.App) - /// - Remark: Generated from `#/components/schemas/BundleIdResponse/IncludedPayload/BundleIdCapability`. - case bundleIdCapabilities(Components.Schemas.BundleIdCapability) - /// - Remark: Generated from `#/components/schemas/BundleIdResponse/IncludedPayload/Profile`. - case profiles(Components.Schemas.Profile) + /// - Remark: Generated from `#/components/schemas/BuildUploadResponse/IncludedPayload/Build`. + case builds(Components.Schemas.Build) + /// - Remark: Generated from `#/components/schemas/BuildUploadResponse/IncludedPayload/BuildUploadFile`. + case buildUploadFiles(Components.Schemas.BuildUploadFile) public enum CodingKeys: String, CodingKey { case _type = "type" } @@ -3384,12 +3724,10 @@ public enum Components { forKey: ._type ) switch discriminator { - case "apps": - self = .apps(try .init(from: decoder)) - case "bundleIdCapabilities": - self = .bundleIdCapabilities(try .init(from: decoder)) - case "profiles": - self = .profiles(try .init(from: decoder)) + case "builds": + self = .builds(try .init(from: decoder)) + case "buildUploadFiles": + self = .buildUploadFiles(try .init(from: decoder)) default: throw Swift.DecodingError.unknownOneOfDiscriminator( discriminatorKey: CodingKeys._type, @@ -3400,30 +3738,28 @@ public enum Components { } public func encode(to encoder: any Encoder) throws { switch self { - case let .apps(value): - try value.encode(to: encoder) - case let .bundleIdCapabilities(value): + case let .builds(value): try value.encode(to: encoder) - case let .profiles(value): + case let .buildUploadFiles(value): try value.encode(to: encoder) } } } - /// - Remark: Generated from `#/components/schemas/BundleIdResponse/included`. - public typealias IncludedPayload = [Components.Schemas.BundleIdResponse.IncludedPayloadPayload] - /// - Remark: Generated from `#/components/schemas/BundleIdResponse/included`. - public var included: Components.Schemas.BundleIdResponse.IncludedPayload? - /// - Remark: Generated from `#/components/schemas/BundleIdResponse/links`. + /// - Remark: Generated from `#/components/schemas/BuildUploadResponse/included`. + public typealias IncludedPayload = [Components.Schemas.BuildUploadResponse.IncludedPayloadPayload] + /// - Remark: Generated from `#/components/schemas/BuildUploadResponse/included`. + public var included: Components.Schemas.BuildUploadResponse.IncludedPayload? + /// - Remark: Generated from `#/components/schemas/BuildUploadResponse/links`. public var links: Components.Schemas.DocumentLinks - /// Creates a new `BundleIdResponse`. + /// Creates a new `BuildUploadResponse`. /// /// - Parameters: /// - data: /// - included: /// - links: public init( - data: Components.Schemas.BundleId, - included: Components.Schemas.BundleIdResponse.IncludedPayload? = nil, + data: Components.Schemas.BuildUpload, + included: Components.Schemas.BuildUploadResponse.IncludedPayload? = nil, links: Components.Schemas.DocumentLinks ) { self.data = data @@ -3436,232 +3772,304 @@ public enum Components { case links } } - /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest`. - public struct BundleIdCreateRequest: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data`. + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest`. + public struct BuildUploadCreateRequest: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data`. public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/type`. + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/type`. @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case bundleIds = "bundleIds" + case buildUploads = "buildUploads" } - /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/type`. - public var _type: Components.Schemas.BundleIdCreateRequest.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/attributes`. + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/type`. + public var _type: Components.Schemas.BuildUploadCreateRequest.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/attributes`. public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/attributes/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/attributes/platform`. - public var platform: Components.Schemas.BundleIdPlatform - /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/attributes/identifier`. - public var identifier: Swift.String - /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/attributes/seedId`. - public var seedId: Swift.String? + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/attributes/cfBundleShortVersionString`. + public var cfBundleShortVersionString: Swift.String + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/attributes/cfBundleVersion`. + public var cfBundleVersion: Swift.String + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/attributes/platform`. + public var platform: Components.Schemas.Platform /// Creates a new `AttributesPayload`. /// /// - Parameters: - /// - name: + /// - cfBundleShortVersionString: + /// - cfBundleVersion: /// - platform: - /// - identifier: - /// - seedId: public init( - name: Swift.String, - platform: Components.Schemas.BundleIdPlatform, - identifier: Swift.String, - seedId: Swift.String? = nil + cfBundleShortVersionString: Swift.String, + cfBundleVersion: Swift.String, + platform: Components.Schemas.Platform ) { - self.name = name + self.cfBundleShortVersionString = cfBundleShortVersionString + self.cfBundleVersion = cfBundleVersion self.platform = platform - self.identifier = identifier - self.seedId = seedId } public enum CodingKeys: String, CodingKey { - case name + case cfBundleShortVersionString + case cfBundleVersion case platform - case identifier - case seedId } } - /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/attributes`. - public var attributes: Components.Schemas.BundleIdCreateRequest.DataPayload.AttributesPayload - /// Creates a new `DataPayload`. - /// - /// - Parameters: - /// - _type: - /// - attributes: - public init( - _type: Components.Schemas.BundleIdCreateRequest.DataPayload._TypePayload, - attributes: Components.Schemas.BundleIdCreateRequest.DataPayload.AttributesPayload - ) { - self._type = _type - self.attributes = attributes - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case attributes - } - } - /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data`. - public var data: Components.Schemas.BundleIdCreateRequest.DataPayload - /// Creates a new `BundleIdCreateRequest`. - /// - /// - Parameters: - /// - data: - public init(data: Components.Schemas.BundleIdCreateRequest.DataPayload) { - self.data = data - } - public enum CodingKeys: String, CodingKey { - case data - } - } - /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest`. - public struct BundleIdUpdateRequest: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case bundleIds = "bundleIds" - } - /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data/type`. - public var _type: Components.Schemas.BundleIdUpdateRequest.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data/id`. - public var id: Swift.String - /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data/attributes`. - public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data/attributes/name`. - public var name: Swift.String? - /// Creates a new `AttributesPayload`. + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/attributes`. + public var attributes: Components.Schemas.BuildUploadCreateRequest.DataPayload.AttributesPayload + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/relationships`. + public struct RelationshipsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/relationships/app`. + public struct AppPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/relationships/app/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/relationships/app/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case apps = "apps" + } + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/relationships/app/data/type`. + public var _type: Components.Schemas.BuildUploadCreateRequest.DataPayload.RelationshipsPayload.AppPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/relationships/app/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.BuildUploadCreateRequest.DataPayload.RelationshipsPayload.AppPayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/relationships/app/data`. + public var data: Components.Schemas.BuildUploadCreateRequest.DataPayload.RelationshipsPayload.AppPayload.DataPayload + /// Creates a new `AppPayload`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.BuildUploadCreateRequest.DataPayload.RelationshipsPayload.AppPayload.DataPayload) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/relationships/app`. + public var app: Components.Schemas.BuildUploadCreateRequest.DataPayload.RelationshipsPayload.AppPayload + /// Creates a new `RelationshipsPayload`. /// /// - Parameters: - /// - name: - public init(name: Swift.String? = nil) { - self.name = name + /// - app: + public init(app: Components.Schemas.BuildUploadCreateRequest.DataPayload.RelationshipsPayload.AppPayload) { + self.app = app } public enum CodingKeys: String, CodingKey { - case name + case app } } - /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data/attributes`. - public var attributes: Components.Schemas.BundleIdUpdateRequest.DataPayload.AttributesPayload? + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data/relationships`. + public var relationships: Components.Schemas.BuildUploadCreateRequest.DataPayload.RelationshipsPayload /// Creates a new `DataPayload`. /// /// - Parameters: /// - _type: - /// - id: /// - attributes: + /// - relationships: public init( - _type: Components.Schemas.BundleIdUpdateRequest.DataPayload._TypePayload, - id: Swift.String, - attributes: Components.Schemas.BundleIdUpdateRequest.DataPayload.AttributesPayload? = nil + _type: Components.Schemas.BuildUploadCreateRequest.DataPayload._TypePayload, + attributes: Components.Schemas.BuildUploadCreateRequest.DataPayload.AttributesPayload, + relationships: Components.Schemas.BuildUploadCreateRequest.DataPayload.RelationshipsPayload ) { self._type = _type - self.id = id self.attributes = attributes + self.relationships = relationships } public enum CodingKeys: String, CodingKey { case _type = "type" - case id case attributes + case relationships } } - /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data`. - public var data: Components.Schemas.BundleIdUpdateRequest.DataPayload - /// Creates a new `BundleIdUpdateRequest`. + /// - Remark: Generated from `#/components/schemas/BuildUploadCreateRequest/data`. + public var data: Components.Schemas.BuildUploadCreateRequest.DataPayload + /// Creates a new `BuildUploadCreateRequest`. /// /// - Parameters: /// - data: - public init(data: Components.Schemas.BundleIdUpdateRequest.DataPayload) { + public init(data: Components.Schemas.BuildUploadCreateRequest.DataPayload) { self.data = data } public enum CodingKeys: String, CodingKey { case data } } - /// - Remark: Generated from `#/components/schemas/Certificate`. - public struct Certificate: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Certificate/type`. + /// - Remark: Generated from `#/components/schemas/Build`. + public struct Build: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/type`. @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case certificates = "certificates" + case builds = "builds" } - /// - Remark: Generated from `#/components/schemas/Certificate/type`. - public var _type: Components.Schemas.Certificate._TypePayload - /// - Remark: Generated from `#/components/schemas/Certificate/id`. + /// - Remark: Generated from `#/components/schemas/Build/type`. + public var _type: Components.Schemas.Build._TypePayload + /// - Remark: Generated from `#/components/schemas/Build/id`. public var id: Swift.String - /// - Remark: Generated from `#/components/schemas/Certificate/attributes`. + /// - Remark: Generated from `#/components/schemas/Build/attributes`. public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Certificate/attributes/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/Certificate/attributes/certificateType`. - public var certificateType: Components.Schemas.CertificateType? - /// - Remark: Generated from `#/components/schemas/Certificate/attributes/displayName`. - public var displayName: Swift.String? - /// - Remark: Generated from `#/components/schemas/Certificate/attributes/serialNumber`. - public var serialNumber: Swift.String? - /// - Remark: Generated from `#/components/schemas/Certificate/attributes/platform`. - public var platform: Components.Schemas.BundleIdPlatform? - /// - Remark: Generated from `#/components/schemas/Certificate/attributes/expirationDate`. + /// - Remark: Generated from `#/components/schemas/Build/attributes/version`. + public var version: Swift.String? + /// - Remark: Generated from `#/components/schemas/Build/attributes/uploadedDate`. + public var uploadedDate: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/Build/attributes/expirationDate`. public var expirationDate: Foundation.Date? - /// - Remark: Generated from `#/components/schemas/Certificate/attributes/certificateContent`. - public var certificateContent: Swift.String? - /// - Remark: Generated from `#/components/schemas/Certificate/attributes/activated`. - public var activated: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/Build/attributes/expired`. + public var expired: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/Build/attributes/minOsVersion`. + public var minOsVersion: Swift.String? + /// - Remark: Generated from `#/components/schemas/Build/attributes/lsMinimumSystemVersion`. + public var lsMinimumSystemVersion: Swift.String? + /// - Remark: Generated from `#/components/schemas/Build/attributes/computedMinMacOsVersion`. + public var computedMinMacOsVersion: Swift.String? + /// - Remark: Generated from `#/components/schemas/Build/attributes/computedMinVisionOsVersion`. + public var computedMinVisionOsVersion: Swift.String? + /// - Remark: Generated from `#/components/schemas/Build/attributes/iconAssetToken`. + public var iconAssetToken: Components.Schemas.ImageAsset? + /// - Remark: Generated from `#/components/schemas/Build/attributes/processingState`. + public struct ProcessingStatePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/attributes/processingState/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case processing = "PROCESSING" + case failed = "FAILED" + case invalid = "INVALID" + case valid = "VALID" + } + /// - Remark: Generated from `#/components/schemas/Build/attributes/processingState/value1`. + public var value1: Components.Schemas.Build.AttributesPayload.ProcessingStatePayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/Build/attributes/processingState/value2`. + public var value2: Swift.String? + /// Creates a new `ProcessingStatePayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.Build.AttributesPayload.ProcessingStatePayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/Build/attributes/processingState`. + public var processingState: Components.Schemas.Build.AttributesPayload.ProcessingStatePayload? + /// - Remark: Generated from `#/components/schemas/Build/attributes/buildAudienceType`. + public var buildAudienceType: Components.Schemas.BuildAudienceType? + /// - Remark: Generated from `#/components/schemas/Build/attributes/usesNonExemptEncryption`. + public var usesNonExemptEncryption: Swift.Bool? /// Creates a new `AttributesPayload`. /// /// - Parameters: - /// - name: - /// - certificateType: - /// - displayName: - /// - serialNumber: - /// - platform: + /// - version: + /// - uploadedDate: /// - expirationDate: - /// - certificateContent: - /// - activated: + /// - expired: + /// - minOsVersion: + /// - lsMinimumSystemVersion: + /// - computedMinMacOsVersion: + /// - computedMinVisionOsVersion: + /// - iconAssetToken: + /// - processingState: + /// - buildAudienceType: + /// - usesNonExemptEncryption: public init( - name: Swift.String? = nil, - certificateType: Components.Schemas.CertificateType? = nil, - displayName: Swift.String? = nil, - serialNumber: Swift.String? = nil, - platform: Components.Schemas.BundleIdPlatform? = nil, + version: Swift.String? = nil, + uploadedDate: Foundation.Date? = nil, expirationDate: Foundation.Date? = nil, - certificateContent: Swift.String? = nil, - activated: Swift.Bool? = nil + expired: Swift.Bool? = nil, + minOsVersion: Swift.String? = nil, + lsMinimumSystemVersion: Swift.String? = nil, + computedMinMacOsVersion: Swift.String? = nil, + computedMinVisionOsVersion: Swift.String? = nil, + iconAssetToken: Components.Schemas.ImageAsset? = nil, + processingState: Components.Schemas.Build.AttributesPayload.ProcessingStatePayload? = nil, + buildAudienceType: Components.Schemas.BuildAudienceType? = nil, + usesNonExemptEncryption: Swift.Bool? = nil ) { - self.name = name - self.certificateType = certificateType - self.displayName = displayName - self.serialNumber = serialNumber - self.platform = platform + self.version = version + self.uploadedDate = uploadedDate self.expirationDate = expirationDate - self.certificateContent = certificateContent - self.activated = activated + self.expired = expired + self.minOsVersion = minOsVersion + self.lsMinimumSystemVersion = lsMinimumSystemVersion + self.computedMinMacOsVersion = computedMinMacOsVersion + self.computedMinVisionOsVersion = computedMinVisionOsVersion + self.iconAssetToken = iconAssetToken + self.processingState = processingState + self.buildAudienceType = buildAudienceType + self.usesNonExemptEncryption = usesNonExemptEncryption } public enum CodingKeys: String, CodingKey { - case name - case certificateType - case displayName - case serialNumber - case platform + case version + case uploadedDate case expirationDate - case certificateContent - case activated - } - } - /// - Remark: Generated from `#/components/schemas/Certificate/attributes`. - public var attributes: Components.Schemas.Certificate.AttributesPayload? - /// - Remark: Generated from `#/components/schemas/Certificate/relationships`. + case expired + case minOsVersion + case lsMinimumSystemVersion + case computedMinMacOsVersion + case computedMinVisionOsVersion + case iconAssetToken + case processingState + case buildAudienceType + case usesNonExemptEncryption + } + } + /// - Remark: Generated from `#/components/schemas/Build/attributes`. + public var attributes: Components.Schemas.Build.AttributesPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships`. public struct RelationshipsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId`. - public struct PassTypeIdPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId/links`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/preReleaseVersion`. + public struct PreReleaseVersionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/preReleaseVersion/links`. public var links: Components.Schemas.RelationshipLinks? - /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId/data`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/preReleaseVersion/data`. public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId/data/type`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/preReleaseVersion/data/type`. @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case passTypeIds = "passTypeIds" + case preReleaseVersions = "preReleaseVersions" } - /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId/data/type`. - public var _type: Components.Schemas.Certificate.RelationshipsPayload.PassTypeIdPayload.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId/data/id`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/preReleaseVersion/data/type`. + public var _type: Components.Schemas.Build.RelationshipsPayload.PreReleaseVersionPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Build/relationships/preReleaseVersion/data/id`. public var id: Swift.String /// Creates a new `DataPayload`. /// @@ -3669,7 +4077,7 @@ public enum Components { /// - _type: /// - id: public init( - _type: Components.Schemas.Certificate.RelationshipsPayload.PassTypeIdPayload.DataPayload._TypePayload, + _type: Components.Schemas.Build.RelationshipsPayload.PreReleaseVersionPayload.DataPayload._TypePayload, id: Swift.String ) { self._type = _type @@ -3680,16 +4088,16 @@ public enum Components { case id } } - /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId/data`. - public var data: Components.Schemas.Certificate.RelationshipsPayload.PassTypeIdPayload.DataPayload? - /// Creates a new `PassTypeIdPayload`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/preReleaseVersion/data`. + public var data: Components.Schemas.Build.RelationshipsPayload.PreReleaseVersionPayload.DataPayload? + /// Creates a new `PreReleaseVersionPayload`. /// /// - Parameters: /// - links: /// - data: public init( links: Components.Schemas.RelationshipLinks? = nil, - data: Components.Schemas.Certificate.RelationshipsPayload.PassTypeIdPayload.DataPayload? = nil + data: Components.Schemas.Build.RelationshipsPayload.PreReleaseVersionPayload.DataPayload? = nil ) { self.links = links self.data = data @@ -3699,809 +4107,521 @@ public enum Components { case data } } - /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId`. - public var passTypeId: Components.Schemas.Certificate.RelationshipsPayload.PassTypeIdPayload? - /// Creates a new `RelationshipsPayload`. - /// - /// - Parameters: - /// - passTypeId: - public init(passTypeId: Components.Schemas.Certificate.RelationshipsPayload.PassTypeIdPayload? = nil) { - self.passTypeId = passTypeId - } - public enum CodingKeys: String, CodingKey { - case passTypeId + /// - Remark: Generated from `#/components/schemas/Build/relationships/preReleaseVersion`. + public var preReleaseVersion: Components.Schemas.Build.RelationshipsPayload.PreReleaseVersionPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships/individualTesters`. + public struct IndividualTestersPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/individualTesters/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/Build/relationships/individualTesters/meta`. + public var meta: Components.Schemas.PagingInformation? + /// - Remark: Generated from `#/components/schemas/Build/relationships/individualTesters/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/individualTesters/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case betaTesters = "betaTesters" + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/individualTesters/DataPayload/type`. + public var _type: Components.Schemas.Build.RelationshipsPayload.IndividualTestersPayload.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Build/relationships/individualTesters/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.Build.RelationshipsPayload.IndividualTestersPayload.DataPayloadPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/individualTesters/data`. + public typealias DataPayload = [Components.Schemas.Build.RelationshipsPayload.IndividualTestersPayload.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/Build/relationships/individualTesters/data`. + public var data: Components.Schemas.Build.RelationshipsPayload.IndividualTestersPayload.DataPayload? + /// Creates a new `IndividualTestersPayload`. + /// + /// - Parameters: + /// - links: + /// - meta: + /// - data: + public init( + links: Components.Schemas.RelationshipLinks? = nil, + meta: Components.Schemas.PagingInformation? = nil, + data: Components.Schemas.Build.RelationshipsPayload.IndividualTestersPayload.DataPayload? = nil + ) { + self.links = links + self.meta = meta + self.data = data + } + public enum CodingKeys: String, CodingKey { + case links + case meta + case data + } } - } - /// - Remark: Generated from `#/components/schemas/Certificate/relationships`. - public var relationships: Components.Schemas.Certificate.RelationshipsPayload? - /// - Remark: Generated from `#/components/schemas/Certificate/links`. - public var links: Components.Schemas.ResourceLinks? - /// Creates a new `Certificate`. - /// - /// - Parameters: - /// - _type: - /// - id: - /// - attributes: - /// - relationships: - /// - links: - public init( - _type: Components.Schemas.Certificate._TypePayload, - id: Swift.String, - attributes: Components.Schemas.Certificate.AttributesPayload? = nil, - relationships: Components.Schemas.Certificate.RelationshipsPayload? = nil, - links: Components.Schemas.ResourceLinks? = nil - ) { - self._type = _type - self.id = id - self.attributes = attributes - self.relationships = relationships - self.links = links - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id - case attributes - case relationships - case links - } - } - /// - Remark: Generated from `#/components/schemas/CertificatesResponse`. - public struct CertificatesResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificatesResponse/data`. - public var data: [Components.Schemas.Certificate] - /// - Remark: Generated from `#/components/schemas/CertificatesResponse/included`. - public var included: [Components.Schemas.PassTypeId]? - /// - Remark: Generated from `#/components/schemas/CertificatesResponse/links`. - public var links: Components.Schemas.PagedDocumentLinks - /// - Remark: Generated from `#/components/schemas/CertificatesResponse/meta`. - public var meta: Components.Schemas.PagingInformation? - /// Creates a new `CertificatesResponse`. - /// - /// - Parameters: - /// - data: - /// - included: - /// - links: - /// - meta: - public init( - data: [Components.Schemas.Certificate], - included: [Components.Schemas.PassTypeId]? = nil, - links: Components.Schemas.PagedDocumentLinks, - meta: Components.Schemas.PagingInformation? = nil - ) { - self.data = data - self.included = included - self.links = links - self.meta = meta - } - public enum CodingKeys: String, CodingKey { - case data - case included - case links - case meta - } - } - /// - Remark: Generated from `#/components/schemas/CertificateResponse`. - public struct CertificateResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificateResponse/data`. - public var data: Components.Schemas.Certificate - /// - Remark: Generated from `#/components/schemas/CertificateResponse/included`. - public var included: [Components.Schemas.PassTypeId]? - /// - Remark: Generated from `#/components/schemas/CertificateResponse/links`. - public var links: Components.Schemas.DocumentLinks - /// Creates a new `CertificateResponse`. - /// - /// - Parameters: - /// - data: - /// - included: - /// - links: - public init( - data: Components.Schemas.Certificate, - included: [Components.Schemas.PassTypeId]? = nil, - links: Components.Schemas.DocumentLinks - ) { - self.data = data - self.included = included - self.links = links - } - public enum CodingKeys: String, CodingKey { - case data - case included - case links - } - } - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest`. - public struct CertificateCreateRequest: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case certificates = "certificates" - } - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/type`. - public var _type: Components.Schemas.CertificateCreateRequest.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/attributes`. - public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/attributes/csrContent`. - public var csrContent: Swift.String - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/attributes/certificateType`. - public var certificateType: Components.Schemas.CertificateType - /// Creates a new `AttributesPayload`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/individualTesters`. + public var individualTesters: Components.Schemas.Build.RelationshipsPayload.IndividualTestersPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaGroups`. + public struct BetaGroupsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaGroups/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaGroups/meta`. + public var meta: Components.Schemas.PagingInformation? + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaGroups/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaGroups/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case betaGroups = "betaGroups" + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaGroups/DataPayload/type`. + public var _type: Components.Schemas.Build.RelationshipsPayload.BetaGroupsPayload.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaGroups/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.Build.RelationshipsPayload.BetaGroupsPayload.DataPayloadPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaGroups/data`. + public typealias DataPayload = [Components.Schemas.Build.RelationshipsPayload.BetaGroupsPayload.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaGroups/data`. + public var data: Components.Schemas.Build.RelationshipsPayload.BetaGroupsPayload.DataPayload? + /// Creates a new `BetaGroupsPayload`. /// /// - Parameters: - /// - csrContent: - /// - certificateType: + /// - links: + /// - meta: + /// - data: public init( - csrContent: Swift.String, - certificateType: Components.Schemas.CertificateType + links: Components.Schemas.RelationshipLinks? = nil, + meta: Components.Schemas.PagingInformation? = nil, + data: Components.Schemas.Build.RelationshipsPayload.BetaGroupsPayload.DataPayload? = nil ) { - self.csrContent = csrContent - self.certificateType = certificateType + self.links = links + self.meta = meta + self.data = data } public enum CodingKeys: String, CodingKey { - case csrContent - case certificateType + case links + case meta + case data } } - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/attributes`. - public var attributes: Components.Schemas.CertificateCreateRequest.DataPayload.AttributesPayload - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships`. - public struct RelationshipsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/merchantId`. - public struct MerchantIdPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/merchantId/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/merchantId/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case merchantIds = "merchantIds" - } - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/merchantId/data/type`. - public var _type: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.MerchantIdPayload.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/merchantId/data/id`. - public var id: Swift.String - /// Creates a new `DataPayload`. - /// - /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.MerchantIdPayload.DataPayload._TypePayload, - id: Swift.String - ) { - self._type = _type - self.id = id - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id - } - } - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/merchantId/data`. - public var data: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.MerchantIdPayload.DataPayload? - /// Creates a new `MerchantIdPayload`. - /// - /// - Parameters: - /// - data: - public init(data: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.MerchantIdPayload.DataPayload? = nil) { - self.data = data - } - public enum CodingKeys: String, CodingKey { - case data - } - } - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/merchantId`. - public var merchantId: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.MerchantIdPayload? - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/passTypeId`. - public struct PassTypeIdPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/passTypeId/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/passTypeId/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case passTypeIds = "passTypeIds" - } - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/passTypeId/data/type`. - public var _type: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.PassTypeIdPayload.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/passTypeId/data/id`. - public var id: Swift.String - /// Creates a new `DataPayload`. - /// - /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.PassTypeIdPayload.DataPayload._TypePayload, - id: Swift.String - ) { - self._type = _type - self.id = id - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id - } + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaGroups`. + public var betaGroups: Components.Schemas.Build.RelationshipsPayload.BetaGroupsPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaBuildLocalizations`. + public struct BetaBuildLocalizationsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaBuildLocalizations/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaBuildLocalizations/meta`. + public var meta: Components.Schemas.PagingInformation? + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaBuildLocalizations/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaBuildLocalizations/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case betaBuildLocalizations = "betaBuildLocalizations" } - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/passTypeId/data`. - public var data: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.PassTypeIdPayload.DataPayload? - /// Creates a new `PassTypeIdPayload`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaBuildLocalizations/DataPayload/type`. + public var _type: Components.Schemas.Build.RelationshipsPayload.BetaBuildLocalizationsPayload.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaBuildLocalizations/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. /// /// - Parameters: - /// - data: - public init(data: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.PassTypeIdPayload.DataPayload? = nil) { - self.data = data + /// - _type: + /// - id: + public init( + _type: Components.Schemas.Build.RelationshipsPayload.BetaBuildLocalizationsPayload.DataPayloadPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id } public enum CodingKeys: String, CodingKey { - case data + case _type = "type" + case id } } - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/passTypeId`. - public var passTypeId: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.PassTypeIdPayload? - /// Creates a new `RelationshipsPayload`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaBuildLocalizations/data`. + public typealias DataPayload = [Components.Schemas.Build.RelationshipsPayload.BetaBuildLocalizationsPayload.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaBuildLocalizations/data`. + public var data: Components.Schemas.Build.RelationshipsPayload.BetaBuildLocalizationsPayload.DataPayload? + /// Creates a new `BetaBuildLocalizationsPayload`. /// /// - Parameters: - /// - merchantId: - /// - passTypeId: + /// - links: + /// - meta: + /// - data: public init( - merchantId: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.MerchantIdPayload? = nil, - passTypeId: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.PassTypeIdPayload? = nil + links: Components.Schemas.RelationshipLinks? = nil, + meta: Components.Schemas.PagingInformation? = nil, + data: Components.Schemas.Build.RelationshipsPayload.BetaBuildLocalizationsPayload.DataPayload? = nil ) { - self.merchantId = merchantId - self.passTypeId = passTypeId + self.links = links + self.meta = meta + self.data = data } public enum CodingKeys: String, CodingKey { - case merchantId - case passTypeId + case links + case meta + case data } } - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships`. - public var relationships: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload? - /// Creates a new `DataPayload`. - /// - /// - Parameters: - /// - _type: - /// - attributes: - /// - relationships: - public init( - _type: Components.Schemas.CertificateCreateRequest.DataPayload._TypePayload, - attributes: Components.Schemas.CertificateCreateRequest.DataPayload.AttributesPayload, - relationships: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload? = nil - ) { - self._type = _type - self.attributes = attributes - self.relationships = relationships - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case attributes - case relationships - } - } - /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data`. - public var data: Components.Schemas.CertificateCreateRequest.DataPayload - /// Creates a new `CertificateCreateRequest`. - /// - /// - Parameters: - /// - data: - public init(data: Components.Schemas.CertificateCreateRequest.DataPayload) { - self.data = data - } - public enum CodingKeys: String, CodingKey { - case data - } - } - /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest`. - public struct CertificateUpdateRequest: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case certificates = "certificates" - } - /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data/type`. - public var _type: Components.Schemas.CertificateUpdateRequest.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data/id`. - public var id: Swift.String - /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data/attributes`. - public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data/attributes/activated`. - public var activated: Swift.Bool? - /// Creates a new `AttributesPayload`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaBuildLocalizations`. + public var betaBuildLocalizations: Components.Schemas.Build.RelationshipsPayload.BetaBuildLocalizationsPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships/appEncryptionDeclaration`. + public struct AppEncryptionDeclarationPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/appEncryptionDeclaration/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/Build/relationships/appEncryptionDeclaration/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/appEncryptionDeclaration/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case appEncryptionDeclarations = "appEncryptionDeclarations" + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/appEncryptionDeclaration/data/type`. + public var _type: Components.Schemas.Build.RelationshipsPayload.AppEncryptionDeclarationPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Build/relationships/appEncryptionDeclaration/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.Build.RelationshipsPayload.AppEncryptionDeclarationPayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/appEncryptionDeclaration/data`. + public var data: Components.Schemas.Build.RelationshipsPayload.AppEncryptionDeclarationPayload.DataPayload? + /// Creates a new `AppEncryptionDeclarationPayload`. /// /// - Parameters: - /// - activated: - public init(activated: Swift.Bool? = nil) { - self.activated = activated + /// - links: + /// - data: + public init( + links: Components.Schemas.RelationshipLinks? = nil, + data: Components.Schemas.Build.RelationshipsPayload.AppEncryptionDeclarationPayload.DataPayload? = nil + ) { + self.links = links + self.data = data } public enum CodingKeys: String, CodingKey { - case activated + case links + case data } } - /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data/attributes`. - public var attributes: Components.Schemas.CertificateUpdateRequest.DataPayload.AttributesPayload? - /// Creates a new `DataPayload`. - /// - /// - Parameters: - /// - _type: - /// - id: - /// - attributes: - public init( - _type: Components.Schemas.CertificateUpdateRequest.DataPayload._TypePayload, - id: Swift.String, - attributes: Components.Schemas.CertificateUpdateRequest.DataPayload.AttributesPayload? = nil - ) { - self._type = _type - self.id = id - self.attributes = attributes - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id - case attributes - } - } - /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data`. - public var data: Components.Schemas.CertificateUpdateRequest.DataPayload - /// Creates a new `CertificateUpdateRequest`. - /// - /// - Parameters: - /// - data: - public init(data: Components.Schemas.CertificateUpdateRequest.DataPayload) { - self.data = data - } - public enum CodingKeys: String, CodingKey { - case data - } - } - /// - Remark: Generated from `#/components/schemas/Device`. - public struct Device: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Device/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case devices = "devices" - } - /// - Remark: Generated from `#/components/schemas/Device/type`. - public var _type: Components.Schemas.Device._TypePayload - /// - Remark: Generated from `#/components/schemas/Device/id`. - public var id: Swift.String - /// - Remark: Generated from `#/components/schemas/Device/attributes`. - public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Device/attributes/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/Device/attributes/platform`. - public var platform: Components.Schemas.BundleIdPlatform? - /// - Remark: Generated from `#/components/schemas/Device/attributes/udid`. - public var udid: Swift.String? - /// - Remark: Generated from `#/components/schemas/Device/attributes/deviceClass`. - public struct DeviceClassPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Device/attributes/deviceClass/value1`. - @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { - case appleVisionPro = "APPLE_VISION_PRO" - case appleWatch = "APPLE_WATCH" - case ipad = "IPAD" - case iphone = "IPHONE" - case ipod = "IPOD" - case appleTv = "APPLE_TV" - case mac = "MAC" + /// - Remark: Generated from `#/components/schemas/Build/relationships/appEncryptionDeclaration`. + public var appEncryptionDeclaration: Components.Schemas.Build.RelationshipsPayload.AppEncryptionDeclarationPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaAppReviewSubmission`. + public struct BetaAppReviewSubmissionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaAppReviewSubmission/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaAppReviewSubmission/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaAppReviewSubmission/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case betaAppReviewSubmissions = "betaAppReviewSubmissions" + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaAppReviewSubmission/data/type`. + public var _type: Components.Schemas.Build.RelationshipsPayload.BetaAppReviewSubmissionPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaAppReviewSubmission/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.Build.RelationshipsPayload.BetaAppReviewSubmissionPayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } } - /// - Remark: Generated from `#/components/schemas/Device/attributes/deviceClass/value1`. - public var value1: Components.Schemas.Device.AttributesPayload.DeviceClassPayload.Value1Payload? - /// - Remark: Generated from `#/components/schemas/Device/attributes/deviceClass/value2`. - public var value2: Swift.String? - /// Creates a new `DeviceClassPayload`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaAppReviewSubmission/data`. + public var data: Components.Schemas.Build.RelationshipsPayload.BetaAppReviewSubmissionPayload.DataPayload? + /// Creates a new `BetaAppReviewSubmissionPayload`. /// /// - Parameters: - /// - value1: - /// - value2: + /// - links: + /// - data: public init( - value1: Components.Schemas.Device.AttributesPayload.DeviceClassPayload.Value1Payload? = nil, - value2: Swift.String? = nil + links: Components.Schemas.RelationshipLinks? = nil, + data: Components.Schemas.Build.RelationshipsPayload.BetaAppReviewSubmissionPayload.DataPayload? = nil ) { - self.value1 = value1 - self.value2 = value2 - } - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self.value1 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) - } - do { - self.value2 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) - } - try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( - [ - self.value1, - self.value2 - ], - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + self.links = links + self.data = data } - public func encode(to encoder: any Encoder) throws { - try encoder.encodeFirstNonNilValueToSingleValueContainer([ - self.value1, - self.value2 - ]) + public enum CodingKeys: String, CodingKey { + case links + case data } } - /// - Remark: Generated from `#/components/schemas/Device/attributes/deviceClass`. - public var deviceClass: Components.Schemas.Device.AttributesPayload.DeviceClassPayload? - /// - Remark: Generated from `#/components/schemas/Device/attributes/status`. - public struct StatusPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Device/attributes/status/value1`. - @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { - case enabled = "ENABLED" - case disabled = "DISABLED" + /// - Remark: Generated from `#/components/schemas/Build/relationships/betaAppReviewSubmission`. + public var betaAppReviewSubmission: Components.Schemas.Build.RelationshipsPayload.BetaAppReviewSubmissionPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships/app`. + public struct AppPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/app/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/Build/relationships/app/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/app/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case apps = "apps" + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/app/data/type`. + public var _type: Components.Schemas.Build.RelationshipsPayload.AppPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Build/relationships/app/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.Build.RelationshipsPayload.AppPayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } } - /// - Remark: Generated from `#/components/schemas/Device/attributes/status/value1`. - public var value1: Components.Schemas.Device.AttributesPayload.StatusPayload.Value1Payload? - /// - Remark: Generated from `#/components/schemas/Device/attributes/status/value2`. - public var value2: Swift.String? - /// Creates a new `StatusPayload`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/app/data`. + public var data: Components.Schemas.Build.RelationshipsPayload.AppPayload.DataPayload? + /// Creates a new `AppPayload`. /// /// - Parameters: - /// - value1: - /// - value2: - public init( - value1: Components.Schemas.Device.AttributesPayload.StatusPayload.Value1Payload? = nil, - value2: Swift.String? = nil + /// - links: + /// - data: + public init( + links: Components.Schemas.RelationshipLinks? = nil, + data: Components.Schemas.Build.RelationshipsPayload.AppPayload.DataPayload? = nil ) { - self.value1 = value1 - self.value2 = value2 + self.links = links + self.data = data } - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self.value1 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) + public enum CodingKeys: String, CodingKey { + case links + case data + } + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/app`. + public var app: Components.Schemas.Build.RelationshipsPayload.AppPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBetaDetail`. + public struct BuildBetaDetailPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBetaDetail/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBetaDetail/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBetaDetail/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case buildBetaDetails = "buildBetaDetails" } - do { - self.value2 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBetaDetail/data/type`. + public var _type: Components.Schemas.Build.RelationshipsPayload.BuildBetaDetailPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBetaDetail/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.Build.RelationshipsPayload.BuildBetaDetailPayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id } - try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( - [ - self.value1, - self.value2 - ], - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) } - public func encode(to encoder: any Encoder) throws { - try encoder.encodeFirstNonNilValueToSingleValueContainer([ - self.value1, - self.value2 - ]) + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBetaDetail/data`. + public var data: Components.Schemas.Build.RelationshipsPayload.BuildBetaDetailPayload.DataPayload? + /// Creates a new `BuildBetaDetailPayload`. + /// + /// - Parameters: + /// - links: + /// - data: + public init( + links: Components.Schemas.RelationshipLinks? = nil, + data: Components.Schemas.Build.RelationshipsPayload.BuildBetaDetailPayload.DataPayload? = nil + ) { + self.links = links + self.data = data + } + public enum CodingKeys: String, CodingKey { + case links + case data } } - /// - Remark: Generated from `#/components/schemas/Device/attributes/status`. - public var status: Components.Schemas.Device.AttributesPayload.StatusPayload? - /// - Remark: Generated from `#/components/schemas/Device/attributes/model`. - public var model: Swift.String? - /// - Remark: Generated from `#/components/schemas/Device/attributes/addedDate`. - public var addedDate: Foundation.Date? - /// Creates a new `AttributesPayload`. - /// - /// - Parameters: - /// - name: - /// - platform: - /// - udid: - /// - deviceClass: - /// - status: - /// - model: - /// - addedDate: - public init( - name: Swift.String? = nil, - platform: Components.Schemas.BundleIdPlatform? = nil, - udid: Swift.String? = nil, - deviceClass: Components.Schemas.Device.AttributesPayload.DeviceClassPayload? = nil, - status: Components.Schemas.Device.AttributesPayload.StatusPayload? = nil, - model: Swift.String? = nil, - addedDate: Foundation.Date? = nil - ) { - self.name = name - self.platform = platform - self.udid = udid - self.deviceClass = deviceClass - self.status = status - self.model = model - self.addedDate = addedDate - } - public enum CodingKeys: String, CodingKey { - case name - case platform - case udid - case deviceClass - case status - case model - case addedDate - } - } - /// - Remark: Generated from `#/components/schemas/Device/attributes`. - public var attributes: Components.Schemas.Device.AttributesPayload? - /// - Remark: Generated from `#/components/schemas/Device/links`. - public var links: Components.Schemas.ResourceLinks? - /// Creates a new `Device`. - /// - /// - Parameters: - /// - _type: - /// - id: - /// - attributes: - /// - links: - public init( - _type: Components.Schemas.Device._TypePayload, - id: Swift.String, - attributes: Components.Schemas.Device.AttributesPayload? = nil, - links: Components.Schemas.ResourceLinks? = nil - ) { - self._type = _type - self.id = id - self.attributes = attributes - self.links = links - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id - case attributes - case links - } - } - /// - Remark: Generated from `#/components/schemas/DevicesResponse`. - public struct DevicesResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/DevicesResponse/data`. - public var data: [Components.Schemas.Device] - /// - Remark: Generated from `#/components/schemas/DevicesResponse/links`. - public var links: Components.Schemas.PagedDocumentLinks - /// - Remark: Generated from `#/components/schemas/DevicesResponse/meta`. - public var meta: Components.Schemas.PagingInformation? - /// Creates a new `DevicesResponse`. - /// - /// - Parameters: - /// - data: - /// - links: - /// - meta: - public init( - data: [Components.Schemas.Device], - links: Components.Schemas.PagedDocumentLinks, - meta: Components.Schemas.PagingInformation? = nil - ) { - self.data = data - self.links = links - self.meta = meta - } - public enum CodingKeys: String, CodingKey { - case data - case links - case meta - } - } - /// - Remark: Generated from `#/components/schemas/DeviceResponse`. - public struct DeviceResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/DeviceResponse/data`. - public var data: Components.Schemas.Device - /// - Remark: Generated from `#/components/schemas/DeviceResponse/links`. - public var links: Components.Schemas.DocumentLinks - /// Creates a new `DeviceResponse`. - /// - /// - Parameters: - /// - data: - /// - links: - public init( - data: Components.Schemas.Device, - links: Components.Schemas.DocumentLinks - ) { - self.data = data - self.links = links - } - public enum CodingKeys: String, CodingKey { - case data - case links - } - } - /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest`. - public struct DeviceCreateRequest: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case devices = "devices" - } - /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data/type`. - public var _type: Components.Schemas.DeviceCreateRequest.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data/attributes`. - public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data/attributes/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data/attributes/platform`. - public var platform: Components.Schemas.BundleIdPlatform - /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data/attributes/udid`. - public var udid: Swift.String - /// Creates a new `AttributesPayload`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBetaDetail`. + public var buildBetaDetail: Components.Schemas.Build.RelationshipsPayload.BuildBetaDetailPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships/appStoreVersion`. + public struct AppStoreVersionPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/appStoreVersion/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/Build/relationships/appStoreVersion/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/appStoreVersion/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case appStoreVersions = "appStoreVersions" + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/appStoreVersion/data/type`. + public var _type: Components.Schemas.Build.RelationshipsPayload.AppStoreVersionPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Build/relationships/appStoreVersion/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.Build.RelationshipsPayload.AppStoreVersionPayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/appStoreVersion/data`. + public var data: Components.Schemas.Build.RelationshipsPayload.AppStoreVersionPayload.DataPayload? + /// Creates a new `AppStoreVersionPayload`. /// /// - Parameters: - /// - name: - /// - platform: - /// - udid: + /// - links: + /// - data: public init( - name: Swift.String, - platform: Components.Schemas.BundleIdPlatform, - udid: Swift.String + links: Components.Schemas.RelationshipLinks? = nil, + data: Components.Schemas.Build.RelationshipsPayload.AppStoreVersionPayload.DataPayload? = nil ) { - self.name = name - self.platform = platform - self.udid = udid + self.links = links + self.data = data } public enum CodingKeys: String, CodingKey { - case name - case platform - case udid + case links + case data } } - /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data/attributes`. - public var attributes: Components.Schemas.DeviceCreateRequest.DataPayload.AttributesPayload - /// Creates a new `DataPayload`. - /// - /// - Parameters: - /// - _type: - /// - attributes: - public init( - _type: Components.Schemas.DeviceCreateRequest.DataPayload._TypePayload, - attributes: Components.Schemas.DeviceCreateRequest.DataPayload.AttributesPayload - ) { - self._type = _type - self.attributes = attributes - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case attributes - } - } - /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data`. - public var data: Components.Schemas.DeviceCreateRequest.DataPayload - /// Creates a new `DeviceCreateRequest`. - /// - /// - Parameters: - /// - data: - public init(data: Components.Schemas.DeviceCreateRequest.DataPayload) { - self.data = data - } - public enum CodingKeys: String, CodingKey { - case data - } - } - /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest`. - public struct DeviceUpdateRequest: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case devices = "devices" - } - /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/type`. - public var _type: Components.Schemas.DeviceUpdateRequest.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/id`. - public var id: Swift.String - /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/attributes`. - public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/attributes/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/attributes/status`. - @frozen public enum StatusPayload: String, Codable, Hashable, Sendable, CaseIterable { - case enabled = "ENABLED" - case disabled = "DISABLED" + /// - Remark: Generated from `#/components/schemas/Build/relationships/appStoreVersion`. + public var appStoreVersion: Components.Schemas.Build.RelationshipsPayload.AppStoreVersionPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships/icons`. + public struct IconsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/icons/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/Build/relationships/icons/meta`. + public var meta: Components.Schemas.PagingInformation? + /// - Remark: Generated from `#/components/schemas/Build/relationships/icons/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/icons/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case buildIcons = "buildIcons" + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/icons/DataPayload/type`. + public var _type: Components.Schemas.Build.RelationshipsPayload.IconsPayload.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Build/relationships/icons/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.Build.RelationshipsPayload.IconsPayload.DataPayloadPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } } - /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/attributes/status`. - public var status: Components.Schemas.DeviceUpdateRequest.DataPayload.AttributesPayload.StatusPayload? - /// Creates a new `AttributesPayload`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/icons/data`. + public typealias DataPayload = [Components.Schemas.Build.RelationshipsPayload.IconsPayload.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/Build/relationships/icons/data`. + public var data: Components.Schemas.Build.RelationshipsPayload.IconsPayload.DataPayload? + /// Creates a new `IconsPayload`. /// /// - Parameters: - /// - name: - /// - status: + /// - links: + /// - meta: + /// - data: public init( - name: Swift.String? = nil, - status: Components.Schemas.DeviceUpdateRequest.DataPayload.AttributesPayload.StatusPayload? = nil + links: Components.Schemas.RelationshipLinks? = nil, + meta: Components.Schemas.PagingInformation? = nil, + data: Components.Schemas.Build.RelationshipsPayload.IconsPayload.DataPayload? = nil ) { - self.name = name - self.status = status + self.links = links + self.meta = meta + self.data = data } public enum CodingKeys: String, CodingKey { - case name - case status + case links + case meta + case data } } - /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/attributes`. - public var attributes: Components.Schemas.DeviceUpdateRequest.DataPayload.AttributesPayload? - /// Creates a new `DataPayload`. - /// - /// - Parameters: - /// - _type: - /// - id: - /// - attributes: - public init( - _type: Components.Schemas.DeviceUpdateRequest.DataPayload._TypePayload, - id: Swift.String, - attributes: Components.Schemas.DeviceUpdateRequest.DataPayload.AttributesPayload? = nil - ) { - self._type = _type - self.id = id - self.attributes = attributes - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id - case attributes - } - } - /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data`. - public var data: Components.Schemas.DeviceUpdateRequest.DataPayload - /// Creates a new `DeviceUpdateRequest`. - /// - /// - Parameters: - /// - data: - public init(data: Components.Schemas.DeviceUpdateRequest.DataPayload) { - self.data = data - } - public enum CodingKeys: String, CodingKey { - case data - } - } - /// - Remark: Generated from `#/components/schemas/PassTypeId`. - public struct PassTypeId: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/PassTypeId/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case passTypeIds = "passTypeIds" - } - /// - Remark: Generated from `#/components/schemas/PassTypeId/type`. - public var _type: Components.Schemas.PassTypeId._TypePayload - /// - Remark: Generated from `#/components/schemas/PassTypeId/id`. - public var id: Swift.String - /// - Remark: Generated from `#/components/schemas/PassTypeId/attributes`. - public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/PassTypeId/attributes/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/PassTypeId/attributes/identifier`. - public var identifier: Swift.String? - /// Creates a new `AttributesPayload`. - /// - /// - Parameters: - /// - name: - /// - identifier: - public init( - name: Swift.String? = nil, - identifier: Swift.String? = nil - ) { - self.name = name - self.identifier = identifier - } - public enum CodingKeys: String, CodingKey { - case name - case identifier - } - } - /// - Remark: Generated from `#/components/schemas/PassTypeId/attributes`. - public var attributes: Components.Schemas.PassTypeId.AttributesPayload? - /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships`. - public struct RelationshipsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates`. - public struct CertificatesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/links`. - public var links: Components.Schemas.RelationshipLinks? - /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/meta`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/icons`. + public var icons: Components.Schemas.Build.RelationshipsPayload.IconsPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBundles`. + public struct BuildBundlesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBundles/meta`. public var meta: Components.Schemas.PagingInformation? - /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/DataPayload`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBundles/DataPayload`. public struct DataPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/DataPayload/type`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBundles/DataPayload/type`. @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case certificates = "certificates" + case buildBundles = "buildBundles" } - /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/DataPayload/type`. - public var _type: Components.Schemas.PassTypeId.RelationshipsPayload.CertificatesPayload.DataPayloadPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/DataPayload/id`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBundles/DataPayload/type`. + public var _type: Components.Schemas.Build.RelationshipsPayload.BuildBundlesPayload.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBundles/DataPayload/id`. public var id: Swift.String /// Creates a new `DataPayloadPayload`. /// @@ -4509,7 +4629,7 @@ public enum Components { /// - _type: /// - id: public init( - _type: Components.Schemas.PassTypeId.RelationshipsPayload.CertificatesPayload.DataPayloadPayload._TypePayload, + _type: Components.Schemas.Build.RelationshipsPayload.BuildBundlesPayload.DataPayloadPayload._TypePayload, id: Swift.String ) { self._type = _type @@ -4520,49 +4640,177 @@ public enum Components { case id } } - /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/data`. - public typealias DataPayload = [Components.Schemas.PassTypeId.RelationshipsPayload.CertificatesPayload.DataPayloadPayload] - /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/data`. - public var data: Components.Schemas.PassTypeId.RelationshipsPayload.CertificatesPayload.DataPayload? - /// Creates a new `CertificatesPayload`. + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBundles/data`. + public typealias DataPayload = [Components.Schemas.Build.RelationshipsPayload.BuildBundlesPayload.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBundles/data`. + public var data: Components.Schemas.Build.RelationshipsPayload.BuildBundlesPayload.DataPayload? + /// Creates a new `BuildBundlesPayload`. /// /// - Parameters: - /// - links: /// - meta: /// - data: public init( - links: Components.Schemas.RelationshipLinks? = nil, meta: Components.Schemas.PagingInformation? = nil, - data: Components.Schemas.PassTypeId.RelationshipsPayload.CertificatesPayload.DataPayload? = nil + data: Components.Schemas.Build.RelationshipsPayload.BuildBundlesPayload.DataPayload? = nil ) { - self.links = links self.meta = meta self.data = data } public enum CodingKeys: String, CodingKey { - case links case meta case data } } - /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates`. - public var certificates: Components.Schemas.PassTypeId.RelationshipsPayload.CertificatesPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildBundles`. + public var buildBundles: Components.Schemas.Build.RelationshipsPayload.BuildBundlesPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildUpload`. + public struct BuildUploadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildUpload/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildUpload/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case buildUploads = "buildUploads" + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildUpload/data/type`. + public var _type: Components.Schemas.Build.RelationshipsPayload.BuildUploadPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildUpload/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.Build.RelationshipsPayload.BuildUploadPayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildUpload/data`. + public var data: Components.Schemas.Build.RelationshipsPayload.BuildUploadPayload.DataPayload? + /// Creates a new `BuildUploadPayload`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.Build.RelationshipsPayload.BuildUploadPayload.DataPayload? = nil) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/buildUpload`. + public var buildUpload: Components.Schemas.Build.RelationshipsPayload.BuildUploadPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships/perfPowerMetrics`. + public struct PerfPowerMetricsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/perfPowerMetrics/links`. + public var links: Components.Schemas.RelationshipLinks? + /// Creates a new `PerfPowerMetricsPayload`. + /// + /// - Parameters: + /// - links: + public init(links: Components.Schemas.RelationshipLinks? = nil) { + self.links = links + } + public enum CodingKeys: String, CodingKey { + case links + } + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/perfPowerMetrics`. + public var perfPowerMetrics: Components.Schemas.Build.RelationshipsPayload.PerfPowerMetricsPayload? + /// - Remark: Generated from `#/components/schemas/Build/relationships/diagnosticSignatures`. + public struct DiagnosticSignaturesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Build/relationships/diagnosticSignatures/links`. + public var links: Components.Schemas.RelationshipLinks? + /// Creates a new `DiagnosticSignaturesPayload`. + /// + /// - Parameters: + /// - links: + public init(links: Components.Schemas.RelationshipLinks? = nil) { + self.links = links + } + public enum CodingKeys: String, CodingKey { + case links + } + } + /// - Remark: Generated from `#/components/schemas/Build/relationships/diagnosticSignatures`. + public var diagnosticSignatures: Components.Schemas.Build.RelationshipsPayload.DiagnosticSignaturesPayload? /// Creates a new `RelationshipsPayload`. /// /// - Parameters: - /// - certificates: - public init(certificates: Components.Schemas.PassTypeId.RelationshipsPayload.CertificatesPayload? = nil) { - self.certificates = certificates + /// - preReleaseVersion: + /// - individualTesters: + /// - betaGroups: + /// - betaBuildLocalizations: + /// - appEncryptionDeclaration: + /// - betaAppReviewSubmission: + /// - app: + /// - buildBetaDetail: + /// - appStoreVersion: + /// - icons: + /// - buildBundles: + /// - buildUpload: + /// - perfPowerMetrics: + /// - diagnosticSignatures: + public init( + preReleaseVersion: Components.Schemas.Build.RelationshipsPayload.PreReleaseVersionPayload? = nil, + individualTesters: Components.Schemas.Build.RelationshipsPayload.IndividualTestersPayload? = nil, + betaGroups: Components.Schemas.Build.RelationshipsPayload.BetaGroupsPayload? = nil, + betaBuildLocalizations: Components.Schemas.Build.RelationshipsPayload.BetaBuildLocalizationsPayload? = nil, + appEncryptionDeclaration: Components.Schemas.Build.RelationshipsPayload.AppEncryptionDeclarationPayload? = nil, + betaAppReviewSubmission: Components.Schemas.Build.RelationshipsPayload.BetaAppReviewSubmissionPayload? = nil, + app: Components.Schemas.Build.RelationshipsPayload.AppPayload? = nil, + buildBetaDetail: Components.Schemas.Build.RelationshipsPayload.BuildBetaDetailPayload? = nil, + appStoreVersion: Components.Schemas.Build.RelationshipsPayload.AppStoreVersionPayload? = nil, + icons: Components.Schemas.Build.RelationshipsPayload.IconsPayload? = nil, + buildBundles: Components.Schemas.Build.RelationshipsPayload.BuildBundlesPayload? = nil, + buildUpload: Components.Schemas.Build.RelationshipsPayload.BuildUploadPayload? = nil, + perfPowerMetrics: Components.Schemas.Build.RelationshipsPayload.PerfPowerMetricsPayload? = nil, + diagnosticSignatures: Components.Schemas.Build.RelationshipsPayload.DiagnosticSignaturesPayload? = nil + ) { + self.preReleaseVersion = preReleaseVersion + self.individualTesters = individualTesters + self.betaGroups = betaGroups + self.betaBuildLocalizations = betaBuildLocalizations + self.appEncryptionDeclaration = appEncryptionDeclaration + self.betaAppReviewSubmission = betaAppReviewSubmission + self.app = app + self.buildBetaDetail = buildBetaDetail + self.appStoreVersion = appStoreVersion + self.icons = icons + self.buildBundles = buildBundles + self.buildUpload = buildUpload + self.perfPowerMetrics = perfPowerMetrics + self.diagnosticSignatures = diagnosticSignatures } public enum CodingKeys: String, CodingKey { - case certificates + case preReleaseVersion + case individualTesters + case betaGroups + case betaBuildLocalizations + case appEncryptionDeclaration + case betaAppReviewSubmission + case app + case buildBetaDetail + case appStoreVersion + case icons + case buildBundles + case buildUpload + case perfPowerMetrics + case diagnosticSignatures } } - /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships`. - public var relationships: Components.Schemas.PassTypeId.RelationshipsPayload? - /// - Remark: Generated from `#/components/schemas/PassTypeId/links`. + /// - Remark: Generated from `#/components/schemas/Build/relationships`. + public var relationships: Components.Schemas.Build.RelationshipsPayload? + /// - Remark: Generated from `#/components/schemas/Build/links`. public var links: Components.Schemas.ResourceLinks? - /// Creates a new `PassTypeId`. + /// Creates a new `Build`. /// /// - Parameters: /// - _type: @@ -4571,10 +4819,10 @@ public enum Components { /// - relationships: /// - links: public init( - _type: Components.Schemas.PassTypeId._TypePayload, + _type: Components.Schemas.Build._TypePayload, id: Swift.String, - attributes: Components.Schemas.PassTypeId.AttributesPayload? = nil, - relationships: Components.Schemas.PassTypeId.RelationshipsPayload? = nil, + attributes: Components.Schemas.Build.AttributesPayload? = nil, + relationships: Components.Schemas.Build.RelationshipsPayload? = nil, links: Components.Schemas.ResourceLinks? = nil ) { self._type = _type @@ -4591,2355 +4839,7463 @@ public enum Components { case links } } - /// - Remark: Generated from `#/components/schemas/PassTypeIdResponse`. - public struct PassTypeIdResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/PassTypeIdResponse/data`. - public var data: Components.Schemas.PassTypeId - /// - Remark: Generated from `#/components/schemas/PassTypeIdResponse/included`. - public var included: [Components.Schemas.Certificate]? - /// - Remark: Generated from `#/components/schemas/PassTypeIdResponse/links`. + /// - Remark: Generated from `#/components/schemas/BundleIdCapability`. + public struct BundleIdCapability: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapability/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case bundleIdCapabilities = "bundleIdCapabilities" + } + /// - Remark: Generated from `#/components/schemas/BundleIdCapability/type`. + public var _type: Components.Schemas.BundleIdCapability._TypePayload + /// - Remark: Generated from `#/components/schemas/BundleIdCapability/id`. + public var id: Swift.String + /// - Remark: Generated from `#/components/schemas/BundleIdCapability/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapability/attributes/capabilityType`. + public var capabilityType: Components.Schemas.CapabilityType? + /// - Remark: Generated from `#/components/schemas/BundleIdCapability/attributes/settings`. + public var settings: [Components.Schemas.CapabilitySetting]? + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - capabilityType: + /// - settings: + public init( + capabilityType: Components.Schemas.CapabilityType? = nil, + settings: [Components.Schemas.CapabilitySetting]? = nil + ) { + self.capabilityType = capabilityType + self.settings = settings + } + public enum CodingKeys: String, CodingKey { + case capabilityType + case settings + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdCapability/attributes`. + public var attributes: Components.Schemas.BundleIdCapability.AttributesPayload? + /// - Remark: Generated from `#/components/schemas/BundleIdCapability/links`. + public var links: Components.Schemas.ResourceLinks? + /// Creates a new `BundleIdCapability`. + /// + /// - Parameters: + /// - _type: + /// - id: + /// - attributes: + /// - links: + public init( + _type: Components.Schemas.BundleIdCapability._TypePayload, + id: Swift.String, + attributes: Components.Schemas.BundleIdCapability.AttributesPayload? = nil, + links: Components.Schemas.ResourceLinks? = nil + ) { + self._type = _type + self.id = id + self.attributes = attributes + self.links = links + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + case attributes + case links + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityResponse`. + public struct BundleIdCapabilityResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityResponse/data`. + public var data: Components.Schemas.BundleIdCapability + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityResponse/links`. public var links: Components.Schemas.DocumentLinks - /// Creates a new `PassTypeIdResponse`. + /// Creates a new `BundleIdCapabilityResponse`. /// /// - Parameters: /// - data: - /// - included: /// - links: public init( - data: Components.Schemas.PassTypeId, - included: [Components.Schemas.Certificate]? = nil, + data: Components.Schemas.BundleIdCapability, links: Components.Schemas.DocumentLinks ) { self.data = data - self.included = included self.links = links } public enum CodingKeys: String, CodingKey { case data - case included case links } } - /// - Remark: Generated from `#/components/schemas/Profile`. - public struct Profile: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Profile/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case profiles = "profiles" - } - /// - Remark: Generated from `#/components/schemas/Profile/type`. - public var _type: Components.Schemas.Profile._TypePayload - /// - Remark: Generated from `#/components/schemas/Profile/id`. - public var id: Swift.String - /// - Remark: Generated from `#/components/schemas/Profile/attributes`. - public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Profile/attributes/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/Profile/attributes/platform`. - public var platform: Components.Schemas.BundleIdPlatform? - /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileType`. - public struct ProfileTypePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileType/value1`. - @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, 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" - } - /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileType/value1`. - public var value1: Components.Schemas.Profile.AttributesPayload.ProfileTypePayload.Value1Payload? - /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileType/value2`. - public var value2: Swift.String? - /// Creates a new `ProfileTypePayload`. - /// - /// - Parameters: - /// - value1: - /// - value2: - public init( - value1: Components.Schemas.Profile.AttributesPayload.ProfileTypePayload.Value1Payload? = nil, - value2: Swift.String? = nil - ) { - self.value1 = value1 - self.value2 = value2 - } - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self.value1 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) - } - do { - self.value2 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) - } - try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( - [ - self.value1, - self.value2 - ], - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - try encoder.encodeFirstNonNilValueToSingleValueContainer([ - self.value1, - self.value2 - ]) - } + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest`. + public struct BundleIdCapabilityCreateRequest: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case bundleIdCapabilities = "bundleIdCapabilities" } - /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileType`. - public var profileType: Components.Schemas.Profile.AttributesPayload.ProfileTypePayload? - /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileState`. - public struct ProfileStatePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileState/value1`. - @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { - case active = "ACTIVE" - case invalid = "INVALID" - } - /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileState/value1`. - public var value1: Components.Schemas.Profile.AttributesPayload.ProfileStatePayload.Value1Payload? - /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileState/value2`. - public var value2: Swift.String? - /// Creates a new `ProfileStatePayload`. + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/type`. + public var _type: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/attributes/capabilityType`. + public var capabilityType: Components.Schemas.CapabilityType + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/attributes/settings`. + public var settings: [Components.Schemas.CapabilitySetting]? + /// Creates a new `AttributesPayload`. /// /// - Parameters: - /// - value1: - /// - value2: + /// - capabilityType: + /// - settings: public init( - value1: Components.Schemas.Profile.AttributesPayload.ProfileStatePayload.Value1Payload? = nil, - value2: Swift.String? = nil + capabilityType: Components.Schemas.CapabilityType, + settings: [Components.Schemas.CapabilitySetting]? = nil ) { - self.value1 = value1 - self.value2 = value2 - } - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self.value1 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) - } - do { - self.value2 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) - } - try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( - [ - self.value1, - self.value2 - ], - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + self.capabilityType = capabilityType + self.settings = settings } - public func encode(to encoder: any Encoder) throws { - try encoder.encodeFirstNonNilValueToSingleValueContainer([ - self.value1, - self.value2 - ]) + public enum CodingKeys: String, CodingKey { + case capabilityType + case settings } } - /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileState`. - public var profileState: Components.Schemas.Profile.AttributesPayload.ProfileStatePayload? - /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileContent`. - public var profileContent: Swift.String? - /// - Remark: Generated from `#/components/schemas/Profile/attributes/uuid`. - public var uuid: Swift.String? - /// - Remark: Generated from `#/components/schemas/Profile/attributes/createdDate`. - public var createdDate: Foundation.Date? - /// - Remark: Generated from `#/components/schemas/Profile/attributes/expirationDate`. - public var expirationDate: Foundation.Date? - /// Creates a new `AttributesPayload`. - /// - /// - Parameters: - /// - name: - /// - platform: - /// - profileType: - /// - profileState: - /// - profileContent: - /// - uuid: - /// - createdDate: - /// - expirationDate: - public init( - name: Swift.String? = nil, - platform: Components.Schemas.BundleIdPlatform? = nil, - profileType: Components.Schemas.Profile.AttributesPayload.ProfileTypePayload? = nil, - profileState: Components.Schemas.Profile.AttributesPayload.ProfileStatePayload? = nil, - profileContent: Swift.String? = nil, - uuid: Swift.String? = nil, - createdDate: Foundation.Date? = nil, - expirationDate: Foundation.Date? = nil - ) { - self.name = name - self.platform = platform - self.profileType = profileType - self.profileState = profileState - self.profileContent = profileContent - self.uuid = uuid - self.createdDate = createdDate - self.expirationDate = expirationDate - } - public enum CodingKeys: String, CodingKey { - case name - case platform - case profileType - case profileState - case profileContent - case uuid - case createdDate - case expirationDate - } - } - /// - Remark: Generated from `#/components/schemas/Profile/attributes`. - public var attributes: Components.Schemas.Profile.AttributesPayload? - /// - Remark: Generated from `#/components/schemas/Profile/relationships`. - public struct RelationshipsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId`. - public struct BundleIdPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId/links`. - public var links: Components.Schemas.RelationshipLinks? - /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case bundleIds = "bundleIds" + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/attributes`. + public var attributes: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.AttributesPayload + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships`. + public struct RelationshipsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/bundleId`. + public struct BundleIdPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/bundleId/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/bundleId/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case bundleIds = "bundleIds" + } + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/bundleId/data/type`. + public var _type: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/bundleId/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } } - /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId/data/type`. - public var _type: Components.Schemas.Profile.RelationshipsPayload.BundleIdPayload.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId/data/id`. - public var id: Swift.String - /// Creates a new `DataPayload`. + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/bundleId/data`. + public var data: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload + /// Creates a new `BundleIdPayload`. /// /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.Profile.RelationshipsPayload.BundleIdPayload.DataPayload._TypePayload, - id: Swift.String - ) { - self._type = _type - self.id = id + /// - data: + public init(data: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload) { + self.data = data } public enum CodingKeys: String, CodingKey { - case _type = "type" - case id + case data } } - /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId/data`. - public var data: Components.Schemas.Profile.RelationshipsPayload.BundleIdPayload.DataPayload? - /// Creates a new `BundleIdPayload`. - /// - /// - Parameters: - /// - links: - /// - data: - public init( - links: Components.Schemas.RelationshipLinks? = nil, - data: Components.Schemas.Profile.RelationshipsPayload.BundleIdPayload.DataPayload? = nil - ) { - self.links = links - self.data = data - } - public enum CodingKeys: String, CodingKey { - case links - case data - } - } - /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId`. - public var bundleId: Components.Schemas.Profile.RelationshipsPayload.BundleIdPayload? - /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices`. - public struct DevicesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/links`. - public var links: Components.Schemas.RelationshipLinks? - /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/meta`. - public var meta: Components.Schemas.PagingInformation? - /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/DataPayload`. - public struct DataPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/DataPayload/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case devices = "devices" + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/bundleId`. + public var bundleId: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/capability`. + public struct CapabilityPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/capability/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/capability/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case capabilities = "capabilities" + } + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/capability/data/type`. + public var _type: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.CapabilityPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/capability/data/id`. + public var id: Components.Schemas.CapabilityType + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.CapabilityPayload.DataPayload._TypePayload, + id: Components.Schemas.CapabilityType + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } } - /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/DataPayload/type`. - public var _type: Components.Schemas.Profile.RelationshipsPayload.DevicesPayload.DataPayloadPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/DataPayload/id`. - public var id: Swift.String - /// Creates a new `DataPayloadPayload`. + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/capability/data`. + public var data: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.CapabilityPayload.DataPayload + /// Creates a new `CapabilityPayload`. /// /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.Profile.RelationshipsPayload.DevicesPayload.DataPayloadPayload._TypePayload, - id: Swift.String - ) { - self._type = _type - self.id = id + /// - data: + public init(data: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.CapabilityPayload.DataPayload) { + self.data = data } public enum CodingKeys: String, CodingKey { - case _type = "type" - case id + case data } } - /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/data`. - public typealias DataPayload = [Components.Schemas.Profile.RelationshipsPayload.DevicesPayload.DataPayloadPayload] - /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/data`. - public var data: Components.Schemas.Profile.RelationshipsPayload.DevicesPayload.DataPayload? - /// Creates a new `DevicesPayload`. + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships/capability`. + public var capability: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.CapabilityPayload? + /// Creates a new `RelationshipsPayload`. /// /// - Parameters: - /// - links: - /// - meta: - /// - data: + /// - bundleId: + /// - capability: public init( - links: Components.Schemas.RelationshipLinks? = nil, - meta: Components.Schemas.PagingInformation? = nil, - data: Components.Schemas.Profile.RelationshipsPayload.DevicesPayload.DataPayload? = nil + bundleId: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload, + capability: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload.CapabilityPayload? = nil ) { - self.links = links - self.meta = meta - self.data = data + self.bundleId = bundleId + self.capability = capability } public enum CodingKeys: String, CodingKey { - case links - case meta - case data + case bundleId + case capability } } - /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices`. - public var devices: Components.Schemas.Profile.RelationshipsPayload.DevicesPayload? - /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates`. - public struct CertificatesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/links`. - public var links: Components.Schemas.RelationshipLinks? - /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/meta`. - public var meta: Components.Schemas.PagingInformation? - /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/DataPayload`. - public struct DataPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/DataPayload/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case certificates = "certificates" - } - /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/DataPayload/type`. - public var _type: Components.Schemas.Profile.RelationshipsPayload.CertificatesPayload.DataPayloadPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/DataPayload/id`. - public var id: Swift.String - /// Creates a new `DataPayloadPayload`. - /// - /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.Profile.RelationshipsPayload.CertificatesPayload.DataPayloadPayload._TypePayload, - id: Swift.String - ) { - self._type = _type - self.id = id - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id - } - } - /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/data`. - public typealias DataPayload = [Components.Schemas.Profile.RelationshipsPayload.CertificatesPayload.DataPayloadPayload] - /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/data`. - public var data: Components.Schemas.Profile.RelationshipsPayload.CertificatesPayload.DataPayload? - /// Creates a new `CertificatesPayload`. - /// - /// - Parameters: - /// - links: - /// - meta: - /// - data: - public init( - links: Components.Schemas.RelationshipLinks? = nil, - meta: Components.Schemas.PagingInformation? = nil, - data: Components.Schemas.Profile.RelationshipsPayload.CertificatesPayload.DataPayload? = nil - ) { - self.links = links - self.meta = meta - self.data = data - } - public enum CodingKeys: String, CodingKey { - case links - case meta - case data - } - } - /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates`. - public var certificates: Components.Schemas.Profile.RelationshipsPayload.CertificatesPayload? - /// Creates a new `RelationshipsPayload`. + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data/relationships`. + public var relationships: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload + /// Creates a new `DataPayload`. /// /// - Parameters: - /// - bundleId: - /// - devices: - /// - certificates: + /// - _type: + /// - attributes: + /// - relationships: public init( - bundleId: Components.Schemas.Profile.RelationshipsPayload.BundleIdPayload? = nil, - devices: Components.Schemas.Profile.RelationshipsPayload.DevicesPayload? = nil, - certificates: Components.Schemas.Profile.RelationshipsPayload.CertificatesPayload? = nil + _type: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload._TypePayload, + attributes: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.AttributesPayload, + relationships: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload.RelationshipsPayload ) { - self.bundleId = bundleId - self.devices = devices - self.certificates = certificates + self._type = _type + self.attributes = attributes + self.relationships = relationships } public enum CodingKeys: String, CodingKey { - case bundleId - case devices - case certificates + case _type = "type" + case attributes + case relationships } } - /// - Remark: Generated from `#/components/schemas/Profile/relationships`. - public var relationships: Components.Schemas.Profile.RelationshipsPayload? - /// - Remark: Generated from `#/components/schemas/Profile/links`. - public var links: Components.Schemas.ResourceLinks? - /// Creates a new `Profile`. + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityCreateRequest/data`. + public var data: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload + /// Creates a new `BundleIdCapabilityCreateRequest`. /// /// - Parameters: - /// - _type: - /// - id: - /// - attributes: - /// - relationships: - /// - links: - public init( - _type: Components.Schemas.Profile._TypePayload, - id: Swift.String, - attributes: Components.Schemas.Profile.AttributesPayload? = nil, - relationships: Components.Schemas.Profile.RelationshipsPayload? = nil, - links: Components.Schemas.ResourceLinks? = nil - ) { - self._type = _type - self.id = id - self.attributes = attributes - self.relationships = relationships - self.links = links + /// - data: + public init(data: Components.Schemas.BundleIdCapabilityCreateRequest.DataPayload) { + self.data = data } public enum CodingKeys: String, CodingKey { - case _type = "type" - case id - case attributes - case relationships - case links + case data } } - /// - Remark: Generated from `#/components/schemas/ProfilesResponse`. - public struct ProfilesResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfilesResponse/data`. - public var data: [Components.Schemas.Profile] - /// - Remark: Generated from `#/components/schemas/ProfilesResponse/IncludedPayload`. - @frozen public enum IncludedPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfilesResponse/IncludedPayload/BundleId`. - case bundleIds(Components.Schemas.BundleId) - /// - Remark: Generated from `#/components/schemas/ProfilesResponse/IncludedPayload/Certificate`. - case certificates(Components.Schemas.Certificate) - /// - Remark: Generated from `#/components/schemas/ProfilesResponse/IncludedPayload/Device`. - case devices(Components.Schemas.Device) - public enum CodingKeys: String, CodingKey { - case _type = "type" + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest`. + public struct BundleIdCapabilityUpdateRequest: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case bundleIdCapabilities = "bundleIdCapabilities" } - public init(from decoder: any Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - let discriminator = try container.decode( - Swift.String.self, - forKey: ._type - ) - switch discriminator { - case "bundleIds": - self = .bundleIds(try .init(from: decoder)) - case "certificates": - self = .certificates(try .init(from: decoder)) - case "devices": - self = .devices(try .init(from: decoder)) - default: - throw Swift.DecodingError.unknownOneOfDiscriminator( - discriminatorKey: CodingKeys._type, - discriminatorValue: discriminator, - codingPath: decoder.codingPath - ) + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data/type`. + public var _type: Components.Schemas.BundleIdCapabilityUpdateRequest.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data/id`. + public var id: Swift.String + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data/attributes/capabilityType`. + public var capabilityType: Components.Schemas.CapabilityType? + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data/attributes/settings`. + public var settings: [Components.Schemas.CapabilitySetting]? + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - capabilityType: + /// - settings: + public init( + capabilityType: Components.Schemas.CapabilityType? = nil, + settings: [Components.Schemas.CapabilitySetting]? = nil + ) { + self.capabilityType = capabilityType + self.settings = settings } - } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .bundleIds(value): - try value.encode(to: encoder) - case let .certificates(value): - try value.encode(to: encoder) - case let .devices(value): - try value.encode(to: encoder) + public enum CodingKeys: String, CodingKey { + case capabilityType + case settings } } + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data/attributes`. + public var attributes: Components.Schemas.BundleIdCapabilityUpdateRequest.DataPayload.AttributesPayload? + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + /// - attributes: + public init( + _type: Components.Schemas.BundleIdCapabilityUpdateRequest.DataPayload._TypePayload, + id: Swift.String, + attributes: Components.Schemas.BundleIdCapabilityUpdateRequest.DataPayload.AttributesPayload? = nil + ) { + self._type = _type + self.id = id + self.attributes = attributes + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + case attributes + } } - /// - Remark: Generated from `#/components/schemas/ProfilesResponse/included`. - public typealias IncludedPayload = [Components.Schemas.ProfilesResponse.IncludedPayloadPayload] - /// - Remark: Generated from `#/components/schemas/ProfilesResponse/included`. - public var included: Components.Schemas.ProfilesResponse.IncludedPayload? - /// - Remark: Generated from `#/components/schemas/ProfilesResponse/links`. - public var links: Components.Schemas.PagedDocumentLinks - /// - Remark: Generated from `#/components/schemas/ProfilesResponse/meta`. - public var meta: Components.Schemas.PagingInformation? - /// Creates a new `ProfilesResponse`. + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilityUpdateRequest/data`. + public var data: Components.Schemas.BundleIdCapabilityUpdateRequest.DataPayload + /// Creates a new `BundleIdCapabilityUpdateRequest`. /// /// - Parameters: /// - data: - /// - included: - /// - links: - /// - meta: - public init( - data: [Components.Schemas.Profile], - included: Components.Schemas.ProfilesResponse.IncludedPayload? = nil, - links: Components.Schemas.PagedDocumentLinks, - meta: Components.Schemas.PagingInformation? = nil - ) { + public init(data: Components.Schemas.BundleIdCapabilityUpdateRequest.DataPayload) { self.data = data - self.included = included - self.links = links - self.meta = meta } public enum CodingKeys: String, CodingKey { case data - case included - case links - case meta } } - /// - Remark: Generated from `#/components/schemas/ProfileResponse`. - public struct ProfileResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileResponse/data`. - public var data: Components.Schemas.Profile - /// - Remark: Generated from `#/components/schemas/ProfileResponse/IncludedPayload`. - @frozen public enum IncludedPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileResponse/IncludedPayload/BundleId`. - case bundleIds(Components.Schemas.BundleId) - /// - Remark: Generated from `#/components/schemas/ProfileResponse/IncludedPayload/Certificate`. - case certificates(Components.Schemas.Certificate) - /// - Remark: Generated from `#/components/schemas/ProfileResponse/IncludedPayload/Device`. - case devices(Components.Schemas.Device) - public enum CodingKeys: String, CodingKey { - case _type = "type" - } - public init(from decoder: any Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - let discriminator = try container.decode( - Swift.String.self, - forKey: ._type - ) - switch discriminator { - case "bundleIds": - self = .bundleIds(try .init(from: decoder)) - case "certificates": - self = .certificates(try .init(from: decoder)) - case "devices": - self = .devices(try .init(from: decoder)) - default: - throw Swift.DecodingError.unknownOneOfDiscriminator( - discriminatorKey: CodingKeys._type, - discriminatorValue: discriminator, - codingPath: decoder.codingPath - ) - } - } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .bundleIds(value): - try value.encode(to: encoder) - case let .certificates(value): - try value.encode(to: encoder) - case let .devices(value): - try value.encode(to: encoder) - } - } - } - /// - Remark: Generated from `#/components/schemas/ProfileResponse/included`. - public typealias IncludedPayload = [Components.Schemas.ProfileResponse.IncludedPayloadPayload] - /// - Remark: Generated from `#/components/schemas/ProfileResponse/included`. - public var included: Components.Schemas.ProfileResponse.IncludedPayload? - /// - Remark: Generated from `#/components/schemas/ProfileResponse/links`. - public var links: Components.Schemas.DocumentLinks - /// Creates a new `ProfileResponse`. - /// - /// - Parameters: - /// - data: - /// - included: - /// - links: - public init( - data: Components.Schemas.Profile, - included: Components.Schemas.ProfileResponse.IncludedPayload? = nil, - links: Components.Schemas.DocumentLinks - ) { - self.data = data - self.included = included - self.links = links - } - public enum CodingKeys: String, CodingKey { - case data - case included - case links + /// - Remark: Generated from `#/components/schemas/BundleId`. + public struct BundleId: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleId/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case bundleIds = "bundleIds" } - } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest`. - public struct ProfileCreateRequest: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case profiles = "profiles" + /// - Remark: Generated from `#/components/schemas/BundleId/type`. + public var _type: Components.Schemas.BundleId._TypePayload + /// - Remark: Generated from `#/components/schemas/BundleId/id`. + public var id: Swift.String + /// - Remark: Generated from `#/components/schemas/BundleId/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleId/attributes/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/BundleId/attributes/platform`. + public var platform: Components.Schemas.BundleIdPlatform? + /// - Remark: Generated from `#/components/schemas/BundleId/attributes/identifier`. + public var identifier: Swift.String? + /// - Remark: Generated from `#/components/schemas/BundleId/attributes/seedId`. + public var seedId: Swift.String? + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - name: + /// - platform: + /// - identifier: + /// - seedId: + public init( + name: Swift.String? = nil, + platform: Components.Schemas.BundleIdPlatform? = nil, + identifier: Swift.String? = nil, + seedId: Swift.String? = nil + ) { + self.name = name + self.platform = platform + self.identifier = identifier + self.seedId = seedId } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/type`. - public var _type: Components.Schemas.ProfileCreateRequest.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes`. - public struct AttributesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes/name`. - public var name: Swift.String - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes/profileType`. - public struct ProfileTypePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes/profileType/value1`. - @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, 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 enum CodingKeys: String, CodingKey { + case name + case platform + case identifier + case seedId + } + } + /// - Remark: Generated from `#/components/schemas/BundleId/attributes`. + public var attributes: Components.Schemas.BundleId.AttributesPayload? + /// - Remark: Generated from `#/components/schemas/BundleId/relationships`. + public struct RelationshipsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles`. + public struct ProfilesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/meta`. + public var meta: Components.Schemas.PagingInformation? + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case profiles = "profiles" } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes/profileType/value1`. - public var value1: Components.Schemas.ProfileCreateRequest.DataPayload.AttributesPayload.ProfileTypePayload.Value1Payload? - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes/profileType/value2`. - public var value2: Swift.String? - /// Creates a new `ProfileTypePayload`. + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/DataPayload/type`. + public var _type: Components.Schemas.BundleId.RelationshipsPayload.ProfilesPayload.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. /// /// - Parameters: - /// - value1: - /// - value2: + /// - _type: + /// - id: public init( - value1: Components.Schemas.ProfileCreateRequest.DataPayload.AttributesPayload.ProfileTypePayload.Value1Payload? = nil, - value2: Swift.String? = nil + _type: Components.Schemas.BundleId.RelationshipsPayload.ProfilesPayload.DataPayloadPayload._TypePayload, + id: Swift.String ) { - self.value1 = value1 - self.value2 = value2 - } - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self.value1 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) - } - do { - self.value2 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) - } - try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( - [ - self.value1, - self.value2 - ], - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + self._type = _type + self.id = id } - public func encode(to encoder: any Encoder) throws { - try encoder.encodeFirstNonNilValueToSingleValueContainer([ - self.value1, - self.value2 - ]) + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id } } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes/profileType`. - public var profileType: Components.Schemas.ProfileCreateRequest.DataPayload.AttributesPayload.ProfileTypePayload - /// Creates a new `AttributesPayload`. + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/data`. + public typealias DataPayload = [Components.Schemas.BundleId.RelationshipsPayload.ProfilesPayload.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles/data`. + public var data: Components.Schemas.BundleId.RelationshipsPayload.ProfilesPayload.DataPayload? + /// Creates a new `ProfilesPayload`. /// /// - Parameters: - /// - name: - /// - profileType: + /// - links: + /// - meta: + /// - data: public init( - name: Swift.String, - profileType: Components.Schemas.ProfileCreateRequest.DataPayload.AttributesPayload.ProfileTypePayload + links: Components.Schemas.RelationshipLinks? = nil, + meta: Components.Schemas.PagingInformation? = nil, + data: Components.Schemas.BundleId.RelationshipsPayload.ProfilesPayload.DataPayload? = nil ) { - self.name = name - self.profileType = profileType + self.links = links + self.meta = meta + self.data = data } public enum CodingKeys: String, CodingKey { - case name - case profileType + case links + case meta + case data } } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes`. - public var attributes: Components.Schemas.ProfileCreateRequest.DataPayload.AttributesPayload - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships`. - public struct RelationshipsPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/bundleId`. - public struct BundleIdPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/bundleId/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/bundleId/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case bundleIds = "bundleIds" - } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/bundleId/data/type`. - public var _type: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/bundleId/data/id`. - public var id: Swift.String - /// Creates a new `DataPayload`. - /// - /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload._TypePayload, - id: Swift.String - ) { - self._type = _type - self.id = id - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id - } + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/profiles`. + public var profiles: Components.Schemas.BundleId.RelationshipsPayload.ProfilesPayload? + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities`. + public struct BundleIdCapabilitiesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/meta`. + public var meta: Components.Schemas.PagingInformation? + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case bundleIdCapabilities = "bundleIdCapabilities" } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/bundleId/data`. - public var data: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload - /// Creates a new `BundleIdPayload`. + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/DataPayload/type`. + public var _type: Components.Schemas.BundleId.RelationshipsPayload.BundleIdCapabilitiesPayload.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. /// /// - Parameters: - /// - data: - public init(data: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload) { - self.data = data - } - public enum CodingKeys: String, CodingKey { - case data - } - } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/bundleId`. - public var bundleId: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices`. - public struct DevicesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices/DataPayload`. - public struct DataPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices/DataPayload/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case devices = "devices" - } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices/DataPayload/type`. - public var _type: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.DevicesPayload.DataPayloadPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices/DataPayload/id`. - public var id: Swift.String - /// Creates a new `DataPayloadPayload`. - /// - /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.DevicesPayload.DataPayloadPayload._TypePayload, - id: Swift.String - ) { - self._type = _type - self.id = id - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id - } - } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices/data`. - public typealias DataPayload = [Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.DevicesPayload.DataPayloadPayload] - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices/data`. - public var data: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.DevicesPayload.DataPayload? - /// Creates a new `DevicesPayload`. - /// - /// - Parameters: - /// - data: - public init(data: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.DevicesPayload.DataPayload? = nil) { - self.data = data + /// - _type: + /// - id: + public init( + _type: Components.Schemas.BundleId.RelationshipsPayload.BundleIdCapabilitiesPayload.DataPayloadPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id } public enum CodingKeys: String, CodingKey { - case data + case _type = "type" + case id } } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices`. - public var devices: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.DevicesPayload? - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates`. - public struct CertificatesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates/DataPayload`. - public struct DataPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates/DataPayload/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case certificates = "certificates" - } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates/DataPayload/type`. - public var _type: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.CertificatesPayload.DataPayloadPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates/DataPayload/id`. - public var id: Swift.String - /// Creates a new `DataPayloadPayload`. - /// - /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.CertificatesPayload.DataPayloadPayload._TypePayload, - id: Swift.String - ) { - self._type = _type - self.id = id - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id - } + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/data`. + public typealias DataPayload = [Components.Schemas.BundleId.RelationshipsPayload.BundleIdCapabilitiesPayload.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities/data`. + public var data: Components.Schemas.BundleId.RelationshipsPayload.BundleIdCapabilitiesPayload.DataPayload? + /// Creates a new `BundleIdCapabilitiesPayload`. + /// + /// - Parameters: + /// - links: + /// - meta: + /// - data: + public init( + links: Components.Schemas.RelationshipLinks? = nil, + meta: Components.Schemas.PagingInformation? = nil, + data: Components.Schemas.BundleId.RelationshipsPayload.BundleIdCapabilitiesPayload.DataPayload? = nil + ) { + self.links = links + self.meta = meta + self.data = data + } + public enum CodingKeys: String, CodingKey { + case links + case meta + case data + } + } + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/bundleIdCapabilities`. + public var bundleIdCapabilities: Components.Schemas.BundleId.RelationshipsPayload.BundleIdCapabilitiesPayload? + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app`. + public struct AppPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case apps = "apps" } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates/data`. - public typealias DataPayload = [Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.CertificatesPayload.DataPayloadPayload] - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates/data`. - public var data: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.CertificatesPayload.DataPayload - /// Creates a new `CertificatesPayload`. + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app/data/type`. + public var _type: Components.Schemas.BundleId.RelationshipsPayload.AppPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. /// /// - Parameters: - /// - data: - public init(data: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.CertificatesPayload.DataPayload) { - self.data = data + /// - _type: + /// - id: + public init( + _type: Components.Schemas.BundleId.RelationshipsPayload.AppPayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id } public enum CodingKeys: String, CodingKey { - case data + case _type = "type" + case id } } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates`. - public var certificates: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.CertificatesPayload - /// Creates a new `RelationshipsPayload`. + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app/data`. + public var data: Components.Schemas.BundleId.RelationshipsPayload.AppPayload.DataPayload? + /// Creates a new `AppPayload`. + /// + /// - Parameters: + /// - links: + /// - data: + public init( + links: Components.Schemas.RelationshipLinks? = nil, + data: Components.Schemas.BundleId.RelationshipsPayload.AppPayload.DataPayload? = nil + ) { + self.links = links + self.data = data + } + public enum CodingKeys: String, CodingKey { + case links + case data + } + } + /// - Remark: Generated from `#/components/schemas/BundleId/relationships/app`. + public var app: Components.Schemas.BundleId.RelationshipsPayload.AppPayload? + /// Creates a new `RelationshipsPayload`. + /// + /// - Parameters: + /// - profiles: + /// - bundleIdCapabilities: + /// - app: + public init( + profiles: Components.Schemas.BundleId.RelationshipsPayload.ProfilesPayload? = nil, + bundleIdCapabilities: Components.Schemas.BundleId.RelationshipsPayload.BundleIdCapabilitiesPayload? = nil, + app: Components.Schemas.BundleId.RelationshipsPayload.AppPayload? = nil + ) { + self.profiles = profiles + self.bundleIdCapabilities = bundleIdCapabilities + self.app = app + } + public enum CodingKeys: String, CodingKey { + case profiles + case bundleIdCapabilities + case app + } + } + /// - Remark: Generated from `#/components/schemas/BundleId/relationships`. + public var relationships: Components.Schemas.BundleId.RelationshipsPayload? + /// - Remark: Generated from `#/components/schemas/BundleId/links`. + public var links: Components.Schemas.ResourceLinks? + /// Creates a new `BundleId`. + /// + /// - Parameters: + /// - _type: + /// - id: + /// - attributes: + /// - relationships: + /// - links: + public init( + _type: Components.Schemas.BundleId._TypePayload, + id: Swift.String, + attributes: Components.Schemas.BundleId.AttributesPayload? = nil, + relationships: Components.Schemas.BundleId.RelationshipsPayload? = nil, + links: Components.Schemas.ResourceLinks? = nil + ) { + self._type = _type + self.id = id + self.attributes = attributes + self.relationships = relationships + self.links = links + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + case attributes + case relationships + case links + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdsResponse`. + public struct BundleIdsResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/data`. + public var data: [Components.Schemas.BundleId] + /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/IncludedPayload`. + @frozen public enum IncludedPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/IncludedPayload/App`. + case apps(Components.Schemas.App) + /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/IncludedPayload/BundleIdCapability`. + case bundleIdCapabilities(Components.Schemas.BundleIdCapability) + /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/IncludedPayload/Profile`. + case profiles(Components.Schemas.Profile) + public enum CodingKeys: String, CodingKey { + case _type = "type" + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + let discriminator = try container.decode( + Swift.String.self, + forKey: ._type + ) + switch discriminator { + case "apps": + self = .apps(try .init(from: decoder)) + case "bundleIdCapabilities": + self = .bundleIdCapabilities(try .init(from: decoder)) + case "profiles": + self = .profiles(try .init(from: decoder)) + default: + throw Swift.DecodingError.unknownOneOfDiscriminator( + discriminatorKey: CodingKeys._type, + discriminatorValue: discriminator, + codingPath: decoder.codingPath + ) + } + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .apps(value): + try value.encode(to: encoder) + case let .bundleIdCapabilities(value): + try value.encode(to: encoder) + case let .profiles(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/included`. + public typealias IncludedPayload = [Components.Schemas.BundleIdsResponse.IncludedPayloadPayload] + /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/included`. + public var included: Components.Schemas.BundleIdsResponse.IncludedPayload? + /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/links`. + public var links: Components.Schemas.PagedDocumentLinks + /// - Remark: Generated from `#/components/schemas/BundleIdsResponse/meta`. + public var meta: Components.Schemas.PagingInformation? + /// Creates a new `BundleIdsResponse`. + /// + /// - Parameters: + /// - data: + /// - included: + /// - links: + /// - meta: + public init( + data: [Components.Schemas.BundleId], + included: Components.Schemas.BundleIdsResponse.IncludedPayload? = nil, + links: Components.Schemas.PagedDocumentLinks, + meta: Components.Schemas.PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + public enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdResponse`. + public struct BundleIdResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdResponse/data`. + public var data: Components.Schemas.BundleId + /// - Remark: Generated from `#/components/schemas/BundleIdResponse/IncludedPayload`. + @frozen public enum IncludedPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdResponse/IncludedPayload/App`. + case apps(Components.Schemas.App) + /// - Remark: Generated from `#/components/schemas/BundleIdResponse/IncludedPayload/BundleIdCapability`. + case bundleIdCapabilities(Components.Schemas.BundleIdCapability) + /// - Remark: Generated from `#/components/schemas/BundleIdResponse/IncludedPayload/Profile`. + case profiles(Components.Schemas.Profile) + public enum CodingKeys: String, CodingKey { + case _type = "type" + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + let discriminator = try container.decode( + Swift.String.self, + forKey: ._type + ) + switch discriminator { + case "apps": + self = .apps(try .init(from: decoder)) + case "bundleIdCapabilities": + self = .bundleIdCapabilities(try .init(from: decoder)) + case "profiles": + self = .profiles(try .init(from: decoder)) + default: + throw Swift.DecodingError.unknownOneOfDiscriminator( + discriminatorKey: CodingKeys._type, + discriminatorValue: discriminator, + codingPath: decoder.codingPath + ) + } + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .apps(value): + try value.encode(to: encoder) + case let .bundleIdCapabilities(value): + try value.encode(to: encoder) + case let .profiles(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdResponse/included`. + public typealias IncludedPayload = [Components.Schemas.BundleIdResponse.IncludedPayloadPayload] + /// - Remark: Generated from `#/components/schemas/BundleIdResponse/included`. + public var included: Components.Schemas.BundleIdResponse.IncludedPayload? + /// - Remark: Generated from `#/components/schemas/BundleIdResponse/links`. + public var links: Components.Schemas.DocumentLinks + /// Creates a new `BundleIdResponse`. + /// + /// - Parameters: + /// - data: + /// - included: + /// - links: + public init( + data: Components.Schemas.BundleId, + included: Components.Schemas.BundleIdResponse.IncludedPayload? = nil, + links: Components.Schemas.DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + public enum CodingKeys: String, CodingKey { + case data + case included + case links + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest`. + public struct BundleIdCreateRequest: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case bundleIds = "bundleIds" + } + /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/type`. + public var _type: Components.Schemas.BundleIdCreateRequest.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/attributes/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/attributes/platform`. + public var platform: Components.Schemas.BundleIdPlatform + /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/attributes/identifier`. + public var identifier: Swift.String + /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/attributes/seedId`. + public var seedId: Swift.String? + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - name: + /// - platform: + /// - identifier: + /// - seedId: + public init( + name: Swift.String, + platform: Components.Schemas.BundleIdPlatform, + identifier: Swift.String, + seedId: Swift.String? = nil + ) { + self.name = name + self.platform = platform + self.identifier = identifier + self.seedId = seedId + } + public enum CodingKeys: String, CodingKey { + case name + case platform + case identifier + case seedId + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data/attributes`. + public var attributes: Components.Schemas.BundleIdCreateRequest.DataPayload.AttributesPayload + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - attributes: + public init( + _type: Components.Schemas.BundleIdCreateRequest.DataPayload._TypePayload, + attributes: Components.Schemas.BundleIdCreateRequest.DataPayload.AttributesPayload + ) { + self._type = _type + self.attributes = attributes + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case attributes + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdCreateRequest/data`. + public var data: Components.Schemas.BundleIdCreateRequest.DataPayload + /// Creates a new `BundleIdCreateRequest`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.BundleIdCreateRequest.DataPayload) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest`. + public struct BundleIdUpdateRequest: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case bundleIds = "bundleIds" + } + /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data/type`. + public var _type: Components.Schemas.BundleIdUpdateRequest.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data/id`. + public var id: Swift.String + /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data/attributes/name`. + public var name: Swift.String? + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - name: + public init(name: Swift.String? = nil) { + self.name = name + } + public enum CodingKeys: String, CodingKey { + case name + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data/attributes`. + public var attributes: Components.Schemas.BundleIdUpdateRequest.DataPayload.AttributesPayload? + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + /// - attributes: + public init( + _type: Components.Schemas.BundleIdUpdateRequest.DataPayload._TypePayload, + id: Swift.String, + attributes: Components.Schemas.BundleIdUpdateRequest.DataPayload.AttributesPayload? = nil + ) { + self._type = _type + self.id = id + self.attributes = attributes + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + case attributes + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdUpdateRequest/data`. + public var data: Components.Schemas.BundleIdUpdateRequest.DataPayload + /// Creates a new `BundleIdUpdateRequest`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.BundleIdUpdateRequest.DataPayload) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/Certificate`. + public struct Certificate: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Certificate/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case certificates = "certificates" + } + /// - Remark: Generated from `#/components/schemas/Certificate/type`. + public var _type: Components.Schemas.Certificate._TypePayload + /// - Remark: Generated from `#/components/schemas/Certificate/id`. + public var id: Swift.String + /// - Remark: Generated from `#/components/schemas/Certificate/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Certificate/attributes/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/Certificate/attributes/certificateType`. + public var certificateType: Components.Schemas.CertificateType? + /// - Remark: Generated from `#/components/schemas/Certificate/attributes/displayName`. + public var displayName: Swift.String? + /// - Remark: Generated from `#/components/schemas/Certificate/attributes/serialNumber`. + public var serialNumber: Swift.String? + /// - Remark: Generated from `#/components/schemas/Certificate/attributes/platform`. + public var platform: Components.Schemas.BundleIdPlatform? + /// - Remark: Generated from `#/components/schemas/Certificate/attributes/expirationDate`. + public var expirationDate: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/Certificate/attributes/certificateContent`. + public var certificateContent: Swift.String? + /// - Remark: Generated from `#/components/schemas/Certificate/attributes/activated`. + public var activated: Swift.Bool? + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - name: + /// - certificateType: + /// - displayName: + /// - serialNumber: + /// - platform: + /// - expirationDate: + /// - certificateContent: + /// - activated: + public init( + name: Swift.String? = nil, + certificateType: Components.Schemas.CertificateType? = nil, + displayName: Swift.String? = nil, + serialNumber: Swift.String? = nil, + platform: Components.Schemas.BundleIdPlatform? = nil, + expirationDate: Foundation.Date? = nil, + certificateContent: Swift.String? = nil, + activated: Swift.Bool? = nil + ) { + self.name = name + self.certificateType = certificateType + self.displayName = displayName + self.serialNumber = serialNumber + self.platform = platform + self.expirationDate = expirationDate + self.certificateContent = certificateContent + self.activated = activated + } + public enum CodingKeys: String, CodingKey { + case name + case certificateType + case displayName + case serialNumber + case platform + case expirationDate + case certificateContent + case activated + } + } + /// - Remark: Generated from `#/components/schemas/Certificate/attributes`. + public var attributes: Components.Schemas.Certificate.AttributesPayload? + /// - Remark: Generated from `#/components/schemas/Certificate/relationships`. + public struct RelationshipsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId`. + public struct PassTypeIdPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case passTypeIds = "passTypeIds" + } + /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId/data/type`. + public var _type: Components.Schemas.Certificate.RelationshipsPayload.PassTypeIdPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.Certificate.RelationshipsPayload.PassTypeIdPayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId/data`. + public var data: Components.Schemas.Certificate.RelationshipsPayload.PassTypeIdPayload.DataPayload? + /// Creates a new `PassTypeIdPayload`. + /// + /// - Parameters: + /// - links: + /// - data: + public init( + links: Components.Schemas.RelationshipLinks? = nil, + data: Components.Schemas.Certificate.RelationshipsPayload.PassTypeIdPayload.DataPayload? = nil + ) { + self.links = links + self.data = data + } + public enum CodingKeys: String, CodingKey { + case links + case data + } + } + /// - Remark: Generated from `#/components/schemas/Certificate/relationships/passTypeId`. + public var passTypeId: Components.Schemas.Certificate.RelationshipsPayload.PassTypeIdPayload? + /// Creates a new `RelationshipsPayload`. + /// + /// - Parameters: + /// - passTypeId: + public init(passTypeId: Components.Schemas.Certificate.RelationshipsPayload.PassTypeIdPayload? = nil) { + self.passTypeId = passTypeId + } + public enum CodingKeys: String, CodingKey { + case passTypeId + } + } + /// - Remark: Generated from `#/components/schemas/Certificate/relationships`. + public var relationships: Components.Schemas.Certificate.RelationshipsPayload? + /// - Remark: Generated from `#/components/schemas/Certificate/links`. + public var links: Components.Schemas.ResourceLinks? + /// Creates a new `Certificate`. + /// + /// - Parameters: + /// - _type: + /// - id: + /// - attributes: + /// - relationships: + /// - links: + public init( + _type: Components.Schemas.Certificate._TypePayload, + id: Swift.String, + attributes: Components.Schemas.Certificate.AttributesPayload? = nil, + relationships: Components.Schemas.Certificate.RelationshipsPayload? = nil, + links: Components.Schemas.ResourceLinks? = nil + ) { + self._type = _type + self.id = id + self.attributes = attributes + self.relationships = relationships + self.links = links + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + case attributes + case relationships + case links + } + } + /// - Remark: Generated from `#/components/schemas/CertificatesResponse`. + public struct CertificatesResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificatesResponse/data`. + public var data: [Components.Schemas.Certificate] + /// - Remark: Generated from `#/components/schemas/CertificatesResponse/included`. + public var included: [Components.Schemas.PassTypeId]? + /// - Remark: Generated from `#/components/schemas/CertificatesResponse/links`. + public var links: Components.Schemas.PagedDocumentLinks + /// - Remark: Generated from `#/components/schemas/CertificatesResponse/meta`. + public var meta: Components.Schemas.PagingInformation? + /// Creates a new `CertificatesResponse`. + /// + /// - Parameters: + /// - data: + /// - included: + /// - links: + /// - meta: + public init( + data: [Components.Schemas.Certificate], + included: [Components.Schemas.PassTypeId]? = nil, + links: Components.Schemas.PagedDocumentLinks, + meta: Components.Schemas.PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + public enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + } + /// - Remark: Generated from `#/components/schemas/CertificateResponse`. + public struct CertificateResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificateResponse/data`. + public var data: Components.Schemas.Certificate + /// - Remark: Generated from `#/components/schemas/CertificateResponse/included`. + public var included: [Components.Schemas.PassTypeId]? + /// - Remark: Generated from `#/components/schemas/CertificateResponse/links`. + public var links: Components.Schemas.DocumentLinks + /// Creates a new `CertificateResponse`. + /// + /// - Parameters: + /// - data: + /// - included: + /// - links: + public init( + data: Components.Schemas.Certificate, + included: [Components.Schemas.PassTypeId]? = nil, + links: Components.Schemas.DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + public enum CodingKeys: String, CodingKey { + case data + case included + case links + } + } + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest`. + public struct CertificateCreateRequest: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case certificates = "certificates" + } + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/type`. + public var _type: Components.Schemas.CertificateCreateRequest.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/attributes/csrContent`. + public var csrContent: Swift.String + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/attributes/certificateType`. + public var certificateType: Components.Schemas.CertificateType + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - csrContent: + /// - certificateType: + public init( + csrContent: Swift.String, + certificateType: Components.Schemas.CertificateType + ) { + self.csrContent = csrContent + self.certificateType = certificateType + } + public enum CodingKeys: String, CodingKey { + case csrContent + case certificateType + } + } + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/attributes`. + public var attributes: Components.Schemas.CertificateCreateRequest.DataPayload.AttributesPayload + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships`. + public struct RelationshipsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/merchantId`. + public struct MerchantIdPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/merchantId/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/merchantId/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case merchantIds = "merchantIds" + } + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/merchantId/data/type`. + public var _type: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.MerchantIdPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/merchantId/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.MerchantIdPayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/merchantId/data`. + public var data: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.MerchantIdPayload.DataPayload? + /// Creates a new `MerchantIdPayload`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.MerchantIdPayload.DataPayload? = nil) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/merchantId`. + public var merchantId: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.MerchantIdPayload? + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/passTypeId`. + public struct PassTypeIdPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/passTypeId/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/passTypeId/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case passTypeIds = "passTypeIds" + } + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/passTypeId/data/type`. + public var _type: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.PassTypeIdPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/passTypeId/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.PassTypeIdPayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/passTypeId/data`. + public var data: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.PassTypeIdPayload.DataPayload? + /// Creates a new `PassTypeIdPayload`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.PassTypeIdPayload.DataPayload? = nil) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships/passTypeId`. + public var passTypeId: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.PassTypeIdPayload? + /// Creates a new `RelationshipsPayload`. + /// + /// - Parameters: + /// - merchantId: + /// - passTypeId: + public init( + merchantId: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.MerchantIdPayload? = nil, + passTypeId: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload.PassTypeIdPayload? = nil + ) { + self.merchantId = merchantId + self.passTypeId = passTypeId + } + public enum CodingKeys: String, CodingKey { + case merchantId + case passTypeId + } + } + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data/relationships`. + public var relationships: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload? + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - attributes: + /// - relationships: + public init( + _type: Components.Schemas.CertificateCreateRequest.DataPayload._TypePayload, + attributes: Components.Schemas.CertificateCreateRequest.DataPayload.AttributesPayload, + relationships: Components.Schemas.CertificateCreateRequest.DataPayload.RelationshipsPayload? = nil + ) { + self._type = _type + self.attributes = attributes + self.relationships = relationships + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case attributes + case relationships + } + } + /// - Remark: Generated from `#/components/schemas/CertificateCreateRequest/data`. + public var data: Components.Schemas.CertificateCreateRequest.DataPayload + /// Creates a new `CertificateCreateRequest`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.CertificateCreateRequest.DataPayload) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest`. + public struct CertificateUpdateRequest: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case certificates = "certificates" + } + /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data/type`. + public var _type: Components.Schemas.CertificateUpdateRequest.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data/id`. + public var id: Swift.String + /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data/attributes/activated`. + public var activated: Swift.Bool? + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - activated: + public init(activated: Swift.Bool? = nil) { + self.activated = activated + } + public enum CodingKeys: String, CodingKey { + case activated + } + } + /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data/attributes`. + public var attributes: Components.Schemas.CertificateUpdateRequest.DataPayload.AttributesPayload? + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + /// - attributes: + public init( + _type: Components.Schemas.CertificateUpdateRequest.DataPayload._TypePayload, + id: Swift.String, + attributes: Components.Schemas.CertificateUpdateRequest.DataPayload.AttributesPayload? = nil + ) { + self._type = _type + self.id = id + self.attributes = attributes + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + case attributes + } + } + /// - Remark: Generated from `#/components/schemas/CertificateUpdateRequest/data`. + public var data: Components.Schemas.CertificateUpdateRequest.DataPayload + /// Creates a new `CertificateUpdateRequest`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.CertificateUpdateRequest.DataPayload) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/Device`. + public struct Device: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Device/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case devices = "devices" + } + /// - Remark: Generated from `#/components/schemas/Device/type`. + public var _type: Components.Schemas.Device._TypePayload + /// - Remark: Generated from `#/components/schemas/Device/id`. + public var id: Swift.String + /// - Remark: Generated from `#/components/schemas/Device/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Device/attributes/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/Device/attributes/platform`. + public var platform: Components.Schemas.BundleIdPlatform? + /// - Remark: Generated from `#/components/schemas/Device/attributes/udid`. + public var udid: Swift.String? + /// - Remark: Generated from `#/components/schemas/Device/attributes/deviceClass`. + public struct DeviceClassPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Device/attributes/deviceClass/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case appleVisionPro = "APPLE_VISION_PRO" + case appleWatch = "APPLE_WATCH" + case ipad = "IPAD" + case iphone = "IPHONE" + case ipod = "IPOD" + case appleTv = "APPLE_TV" + case mac = "MAC" + } + /// - Remark: Generated from `#/components/schemas/Device/attributes/deviceClass/value1`. + public var value1: Components.Schemas.Device.AttributesPayload.DeviceClassPayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/Device/attributes/deviceClass/value2`. + public var value2: Swift.String? + /// Creates a new `DeviceClassPayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.Device.AttributesPayload.DeviceClassPayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/Device/attributes/deviceClass`. + public var deviceClass: Components.Schemas.Device.AttributesPayload.DeviceClassPayload? + /// - Remark: Generated from `#/components/schemas/Device/attributes/status`. + public struct StatusPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Device/attributes/status/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case enabled = "ENABLED" + case disabled = "DISABLED" + } + /// - Remark: Generated from `#/components/schemas/Device/attributes/status/value1`. + public var value1: Components.Schemas.Device.AttributesPayload.StatusPayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/Device/attributes/status/value2`. + public var value2: Swift.String? + /// Creates a new `StatusPayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.Device.AttributesPayload.StatusPayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/Device/attributes/status`. + public var status: Components.Schemas.Device.AttributesPayload.StatusPayload? + /// - Remark: Generated from `#/components/schemas/Device/attributes/model`. + public var model: Swift.String? + /// - Remark: Generated from `#/components/schemas/Device/attributes/addedDate`. + public var addedDate: Foundation.Date? + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - name: + /// - platform: + /// - udid: + /// - deviceClass: + /// - status: + /// - model: + /// - addedDate: + public init( + name: Swift.String? = nil, + platform: Components.Schemas.BundleIdPlatform? = nil, + udid: Swift.String? = nil, + deviceClass: Components.Schemas.Device.AttributesPayload.DeviceClassPayload? = nil, + status: Components.Schemas.Device.AttributesPayload.StatusPayload? = nil, + model: Swift.String? = nil, + addedDate: Foundation.Date? = nil + ) { + self.name = name + self.platform = platform + self.udid = udid + self.deviceClass = deviceClass + self.status = status + self.model = model + self.addedDate = addedDate + } + public enum CodingKeys: String, CodingKey { + case name + case platform + case udid + case deviceClass + case status + case model + case addedDate + } + } + /// - Remark: Generated from `#/components/schemas/Device/attributes`. + public var attributes: Components.Schemas.Device.AttributesPayload? + /// - Remark: Generated from `#/components/schemas/Device/links`. + public var links: Components.Schemas.ResourceLinks? + /// Creates a new `Device`. + /// + /// - Parameters: + /// - _type: + /// - id: + /// - attributes: + /// - links: + public init( + _type: Components.Schemas.Device._TypePayload, + id: Swift.String, + attributes: Components.Schemas.Device.AttributesPayload? = nil, + links: Components.Schemas.ResourceLinks? = nil + ) { + self._type = _type + self.id = id + self.attributes = attributes + self.links = links + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + case attributes + case links + } + } + /// - Remark: Generated from `#/components/schemas/DevicesResponse`. + public struct DevicesResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/DevicesResponse/data`. + public var data: [Components.Schemas.Device] + /// - Remark: Generated from `#/components/schemas/DevicesResponse/links`. + public var links: Components.Schemas.PagedDocumentLinks + /// - Remark: Generated from `#/components/schemas/DevicesResponse/meta`. + public var meta: Components.Schemas.PagingInformation? + /// Creates a new `DevicesResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + /// - meta: + public init( + data: [Components.Schemas.Device], + links: Components.Schemas.PagedDocumentLinks, + meta: Components.Schemas.PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + public enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + } + /// - Remark: Generated from `#/components/schemas/DeviceResponse`. + public struct DeviceResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/DeviceResponse/data`. + public var data: Components.Schemas.Device + /// - Remark: Generated from `#/components/schemas/DeviceResponse/links`. + public var links: Components.Schemas.DocumentLinks + /// Creates a new `DeviceResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + public init( + data: Components.Schemas.Device, + links: Components.Schemas.DocumentLinks + ) { + self.data = data + self.links = links + } + public enum CodingKeys: String, CodingKey { + case data + case links + } + } + /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest`. + public struct DeviceCreateRequest: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case devices = "devices" + } + /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data/type`. + public var _type: Components.Schemas.DeviceCreateRequest.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data/attributes/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data/attributes/platform`. + public var platform: Components.Schemas.BundleIdPlatform + /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data/attributes/udid`. + public var udid: Swift.String + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - name: + /// - platform: + /// - udid: + public init( + name: Swift.String, + platform: Components.Schemas.BundleIdPlatform, + udid: Swift.String + ) { + self.name = name + self.platform = platform + self.udid = udid + } + public enum CodingKeys: String, CodingKey { + case name + case platform + case udid + } + } + /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data/attributes`. + public var attributes: Components.Schemas.DeviceCreateRequest.DataPayload.AttributesPayload + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - attributes: + public init( + _type: Components.Schemas.DeviceCreateRequest.DataPayload._TypePayload, + attributes: Components.Schemas.DeviceCreateRequest.DataPayload.AttributesPayload + ) { + self._type = _type + self.attributes = attributes + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case attributes + } + } + /// - Remark: Generated from `#/components/schemas/DeviceCreateRequest/data`. + public var data: Components.Schemas.DeviceCreateRequest.DataPayload + /// Creates a new `DeviceCreateRequest`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.DeviceCreateRequest.DataPayload) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest`. + public struct DeviceUpdateRequest: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case devices = "devices" + } + /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/type`. + public var _type: Components.Schemas.DeviceUpdateRequest.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/id`. + public var id: Swift.String + /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/attributes/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/attributes/status`. + @frozen public enum StatusPayload: String, Codable, Hashable, Sendable, CaseIterable { + case enabled = "ENABLED" + case disabled = "DISABLED" + } + /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/attributes/status`. + public var status: Components.Schemas.DeviceUpdateRequest.DataPayload.AttributesPayload.StatusPayload? + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - name: + /// - status: + public init( + name: Swift.String? = nil, + status: Components.Schemas.DeviceUpdateRequest.DataPayload.AttributesPayload.StatusPayload? = nil + ) { + self.name = name + self.status = status + } + public enum CodingKeys: String, CodingKey { + case name + case status + } + } + /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data/attributes`. + public var attributes: Components.Schemas.DeviceUpdateRequest.DataPayload.AttributesPayload? + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + /// - attributes: + public init( + _type: Components.Schemas.DeviceUpdateRequest.DataPayload._TypePayload, + id: Swift.String, + attributes: Components.Schemas.DeviceUpdateRequest.DataPayload.AttributesPayload? = nil + ) { + self._type = _type + self.id = id + self.attributes = attributes + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + case attributes + } + } + /// - Remark: Generated from `#/components/schemas/DeviceUpdateRequest/data`. + public var data: Components.Schemas.DeviceUpdateRequest.DataPayload + /// Creates a new `DeviceUpdateRequest`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.DeviceUpdateRequest.DataPayload) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/PassTypeId`. + public struct PassTypeId: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/PassTypeId/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case passTypeIds = "passTypeIds" + } + /// - Remark: Generated from `#/components/schemas/PassTypeId/type`. + public var _type: Components.Schemas.PassTypeId._TypePayload + /// - Remark: Generated from `#/components/schemas/PassTypeId/id`. + public var id: Swift.String + /// - Remark: Generated from `#/components/schemas/PassTypeId/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/PassTypeId/attributes/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/PassTypeId/attributes/identifier`. + public var identifier: Swift.String? + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - name: + /// - identifier: + public init( + name: Swift.String? = nil, + identifier: Swift.String? = nil + ) { + self.name = name + self.identifier = identifier + } + public enum CodingKeys: String, CodingKey { + case name + case identifier + } + } + /// - Remark: Generated from `#/components/schemas/PassTypeId/attributes`. + public var attributes: Components.Schemas.PassTypeId.AttributesPayload? + /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships`. + public struct RelationshipsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates`. + public struct CertificatesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/meta`. + public var meta: Components.Schemas.PagingInformation? + /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case certificates = "certificates" + } + /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/DataPayload/type`. + public var _type: Components.Schemas.PassTypeId.RelationshipsPayload.CertificatesPayload.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.PassTypeId.RelationshipsPayload.CertificatesPayload.DataPayloadPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/data`. + public typealias DataPayload = [Components.Schemas.PassTypeId.RelationshipsPayload.CertificatesPayload.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates/data`. + public var data: Components.Schemas.PassTypeId.RelationshipsPayload.CertificatesPayload.DataPayload? + /// Creates a new `CertificatesPayload`. + /// + /// - Parameters: + /// - links: + /// - meta: + /// - data: + public init( + links: Components.Schemas.RelationshipLinks? = nil, + meta: Components.Schemas.PagingInformation? = nil, + data: Components.Schemas.PassTypeId.RelationshipsPayload.CertificatesPayload.DataPayload? = nil + ) { + self.links = links + self.meta = meta + self.data = data + } + public enum CodingKeys: String, CodingKey { + case links + case meta + case data + } + } + /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships/certificates`. + public var certificates: Components.Schemas.PassTypeId.RelationshipsPayload.CertificatesPayload? + /// Creates a new `RelationshipsPayload`. + /// + /// - Parameters: + /// - certificates: + public init(certificates: Components.Schemas.PassTypeId.RelationshipsPayload.CertificatesPayload? = nil) { + self.certificates = certificates + } + public enum CodingKeys: String, CodingKey { + case certificates + } + } + /// - Remark: Generated from `#/components/schemas/PassTypeId/relationships`. + public var relationships: Components.Schemas.PassTypeId.RelationshipsPayload? + /// - Remark: Generated from `#/components/schemas/PassTypeId/links`. + public var links: Components.Schemas.ResourceLinks? + /// Creates a new `PassTypeId`. + /// + /// - Parameters: + /// - _type: + /// - id: + /// - attributes: + /// - relationships: + /// - links: + public init( + _type: Components.Schemas.PassTypeId._TypePayload, + id: Swift.String, + attributes: Components.Schemas.PassTypeId.AttributesPayload? = nil, + relationships: Components.Schemas.PassTypeId.RelationshipsPayload? = nil, + links: Components.Schemas.ResourceLinks? = nil + ) { + self._type = _type + self.id = id + self.attributes = attributes + self.relationships = relationships + self.links = links + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + case attributes + case relationships + case links + } + } + /// - Remark: Generated from `#/components/schemas/PassTypeIdResponse`. + public struct PassTypeIdResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/PassTypeIdResponse/data`. + public var data: Components.Schemas.PassTypeId + /// - Remark: Generated from `#/components/schemas/PassTypeIdResponse/included`. + public var included: [Components.Schemas.Certificate]? + /// - Remark: Generated from `#/components/schemas/PassTypeIdResponse/links`. + public var links: Components.Schemas.DocumentLinks + /// Creates a new `PassTypeIdResponse`. + /// + /// - Parameters: + /// - data: + /// - included: + /// - links: + public init( + data: Components.Schemas.PassTypeId, + included: [Components.Schemas.Certificate]? = nil, + links: Components.Schemas.DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + public enum CodingKeys: String, CodingKey { + case data + case included + case links + } + } + /// - Remark: Generated from `#/components/schemas/Profile`. + public struct Profile: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Profile/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case profiles = "profiles" + } + /// - Remark: Generated from `#/components/schemas/Profile/type`. + public var _type: Components.Schemas.Profile._TypePayload + /// - Remark: Generated from `#/components/schemas/Profile/id`. + public var id: Swift.String + /// - Remark: Generated from `#/components/schemas/Profile/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Profile/attributes/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/Profile/attributes/platform`. + public var platform: Components.Schemas.BundleIdPlatform? + /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileType`. + public struct ProfileTypePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileType/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, 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" + } + /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileType/value1`. + public var value1: Components.Schemas.Profile.AttributesPayload.ProfileTypePayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileType/value2`. + public var value2: Swift.String? + /// Creates a new `ProfileTypePayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.Profile.AttributesPayload.ProfileTypePayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileType`. + public var profileType: Components.Schemas.Profile.AttributesPayload.ProfileTypePayload? + /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileState`. + public struct ProfileStatePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileState/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case active = "ACTIVE" + case invalid = "INVALID" + } + /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileState/value1`. + public var value1: Components.Schemas.Profile.AttributesPayload.ProfileStatePayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileState/value2`. + public var value2: Swift.String? + /// Creates a new `ProfileStatePayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.Profile.AttributesPayload.ProfileStatePayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileState`. + public var profileState: Components.Schemas.Profile.AttributesPayload.ProfileStatePayload? + /// - Remark: Generated from `#/components/schemas/Profile/attributes/profileContent`. + public var profileContent: Swift.String? + /// - Remark: Generated from `#/components/schemas/Profile/attributes/uuid`. + public var uuid: Swift.String? + /// - Remark: Generated from `#/components/schemas/Profile/attributes/createdDate`. + public var createdDate: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/Profile/attributes/expirationDate`. + public var expirationDate: Foundation.Date? + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - name: + /// - platform: + /// - profileType: + /// - profileState: + /// - profileContent: + /// - uuid: + /// - createdDate: + /// - expirationDate: + public init( + name: Swift.String? = nil, + platform: Components.Schemas.BundleIdPlatform? = nil, + profileType: Components.Schemas.Profile.AttributesPayload.ProfileTypePayload? = nil, + profileState: Components.Schemas.Profile.AttributesPayload.ProfileStatePayload? = nil, + profileContent: Swift.String? = nil, + uuid: Swift.String? = nil, + createdDate: Foundation.Date? = nil, + expirationDate: Foundation.Date? = nil + ) { + self.name = name + self.platform = platform + self.profileType = profileType + self.profileState = profileState + self.profileContent = profileContent + self.uuid = uuid + self.createdDate = createdDate + self.expirationDate = expirationDate + } + public enum CodingKeys: String, CodingKey { + case name + case platform + case profileType + case profileState + case profileContent + case uuid + case createdDate + case expirationDate + } + } + /// - Remark: Generated from `#/components/schemas/Profile/attributes`. + public var attributes: Components.Schemas.Profile.AttributesPayload? + /// - Remark: Generated from `#/components/schemas/Profile/relationships`. + public struct RelationshipsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId`. + public struct BundleIdPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case bundleIds = "bundleIds" + } + /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId/data/type`. + public var _type: Components.Schemas.Profile.RelationshipsPayload.BundleIdPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.Profile.RelationshipsPayload.BundleIdPayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId/data`. + public var data: Components.Schemas.Profile.RelationshipsPayload.BundleIdPayload.DataPayload? + /// Creates a new `BundleIdPayload`. + /// + /// - Parameters: + /// - links: + /// - data: + public init( + links: Components.Schemas.RelationshipLinks? = nil, + data: Components.Schemas.Profile.RelationshipsPayload.BundleIdPayload.DataPayload? = nil + ) { + self.links = links + self.data = data + } + public enum CodingKeys: String, CodingKey { + case links + case data + } + } + /// - Remark: Generated from `#/components/schemas/Profile/relationships/bundleId`. + public var bundleId: Components.Schemas.Profile.RelationshipsPayload.BundleIdPayload? + /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices`. + public struct DevicesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/meta`. + public var meta: Components.Schemas.PagingInformation? + /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case devices = "devices" + } + /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/DataPayload/type`. + public var _type: Components.Schemas.Profile.RelationshipsPayload.DevicesPayload.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.Profile.RelationshipsPayload.DevicesPayload.DataPayloadPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/data`. + public typealias DataPayload = [Components.Schemas.Profile.RelationshipsPayload.DevicesPayload.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices/data`. + public var data: Components.Schemas.Profile.RelationshipsPayload.DevicesPayload.DataPayload? + /// Creates a new `DevicesPayload`. + /// + /// - Parameters: + /// - links: + /// - meta: + /// - data: + public init( + links: Components.Schemas.RelationshipLinks? = nil, + meta: Components.Schemas.PagingInformation? = nil, + data: Components.Schemas.Profile.RelationshipsPayload.DevicesPayload.DataPayload? = nil + ) { + self.links = links + self.meta = meta + self.data = data + } + public enum CodingKeys: String, CodingKey { + case links + case meta + case data + } + } + /// - Remark: Generated from `#/components/schemas/Profile/relationships/devices`. + public var devices: Components.Schemas.Profile.RelationshipsPayload.DevicesPayload? + /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates`. + public struct CertificatesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/links`. + public var links: Components.Schemas.RelationshipLinks? + /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/meta`. + public var meta: Components.Schemas.PagingInformation? + /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case certificates = "certificates" + } + /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/DataPayload/type`. + public var _type: Components.Schemas.Profile.RelationshipsPayload.CertificatesPayload.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.Profile.RelationshipsPayload.CertificatesPayload.DataPayloadPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/data`. + public typealias DataPayload = [Components.Schemas.Profile.RelationshipsPayload.CertificatesPayload.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates/data`. + public var data: Components.Schemas.Profile.RelationshipsPayload.CertificatesPayload.DataPayload? + /// Creates a new `CertificatesPayload`. + /// + /// - Parameters: + /// - links: + /// - meta: + /// - data: + public init( + links: Components.Schemas.RelationshipLinks? = nil, + meta: Components.Schemas.PagingInformation? = nil, + data: Components.Schemas.Profile.RelationshipsPayload.CertificatesPayload.DataPayload? = nil + ) { + self.links = links + self.meta = meta + self.data = data + } + public enum CodingKeys: String, CodingKey { + case links + case meta + case data + } + } + /// - Remark: Generated from `#/components/schemas/Profile/relationships/certificates`. + public var certificates: Components.Schemas.Profile.RelationshipsPayload.CertificatesPayload? + /// Creates a new `RelationshipsPayload`. + /// + /// - Parameters: + /// - bundleId: + /// - devices: + /// - certificates: + public init( + bundleId: Components.Schemas.Profile.RelationshipsPayload.BundleIdPayload? = nil, + devices: Components.Schemas.Profile.RelationshipsPayload.DevicesPayload? = nil, + certificates: Components.Schemas.Profile.RelationshipsPayload.CertificatesPayload? = nil + ) { + self.bundleId = bundleId + self.devices = devices + self.certificates = certificates + } + public enum CodingKeys: String, CodingKey { + case bundleId + case devices + case certificates + } + } + /// - Remark: Generated from `#/components/schemas/Profile/relationships`. + public var relationships: Components.Schemas.Profile.RelationshipsPayload? + /// - Remark: Generated from `#/components/schemas/Profile/links`. + public var links: Components.Schemas.ResourceLinks? + /// Creates a new `Profile`. + /// + /// - Parameters: + /// - _type: + /// - id: + /// - attributes: + /// - relationships: + /// - links: + public init( + _type: Components.Schemas.Profile._TypePayload, + id: Swift.String, + attributes: Components.Schemas.Profile.AttributesPayload? = nil, + relationships: Components.Schemas.Profile.RelationshipsPayload? = nil, + links: Components.Schemas.ResourceLinks? = nil + ) { + self._type = _type + self.id = id + self.attributes = attributes + self.relationships = relationships + self.links = links + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + case attributes + case relationships + case links + } + } + /// - Remark: Generated from `#/components/schemas/ProfilesResponse`. + public struct ProfilesResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfilesResponse/data`. + public var data: [Components.Schemas.Profile] + /// - Remark: Generated from `#/components/schemas/ProfilesResponse/IncludedPayload`. + @frozen public enum IncludedPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfilesResponse/IncludedPayload/BundleId`. + case bundleIds(Components.Schemas.BundleId) + /// - Remark: Generated from `#/components/schemas/ProfilesResponse/IncludedPayload/Certificate`. + case certificates(Components.Schemas.Certificate) + /// - Remark: Generated from `#/components/schemas/ProfilesResponse/IncludedPayload/Device`. + case devices(Components.Schemas.Device) + public enum CodingKeys: String, CodingKey { + case _type = "type" + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + let discriminator = try container.decode( + Swift.String.self, + forKey: ._type + ) + switch discriminator { + case "bundleIds": + self = .bundleIds(try .init(from: decoder)) + case "certificates": + self = .certificates(try .init(from: decoder)) + case "devices": + self = .devices(try .init(from: decoder)) + default: + throw Swift.DecodingError.unknownOneOfDiscriminator( + discriminatorKey: CodingKeys._type, + discriminatorValue: discriminator, + codingPath: decoder.codingPath + ) + } + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .bundleIds(value): + try value.encode(to: encoder) + case let .certificates(value): + try value.encode(to: encoder) + case let .devices(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/ProfilesResponse/included`. + public typealias IncludedPayload = [Components.Schemas.ProfilesResponse.IncludedPayloadPayload] + /// - Remark: Generated from `#/components/schemas/ProfilesResponse/included`. + public var included: Components.Schemas.ProfilesResponse.IncludedPayload? + /// - Remark: Generated from `#/components/schemas/ProfilesResponse/links`. + public var links: Components.Schemas.PagedDocumentLinks + /// - Remark: Generated from `#/components/schemas/ProfilesResponse/meta`. + public var meta: Components.Schemas.PagingInformation? + /// Creates a new `ProfilesResponse`. + /// + /// - Parameters: + /// - data: + /// - included: + /// - links: + /// - meta: + public init( + data: [Components.Schemas.Profile], + included: Components.Schemas.ProfilesResponse.IncludedPayload? = nil, + links: Components.Schemas.PagedDocumentLinks, + meta: Components.Schemas.PagingInformation? = nil + ) { + self.data = data + self.included = included + self.links = links + self.meta = meta + } + public enum CodingKeys: String, CodingKey { + case data + case included + case links + case meta + } + } + /// - Remark: Generated from `#/components/schemas/ProfileResponse`. + public struct ProfileResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileResponse/data`. + public var data: Components.Schemas.Profile + /// - Remark: Generated from `#/components/schemas/ProfileResponse/IncludedPayload`. + @frozen public enum IncludedPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileResponse/IncludedPayload/BundleId`. + case bundleIds(Components.Schemas.BundleId) + /// - Remark: Generated from `#/components/schemas/ProfileResponse/IncludedPayload/Certificate`. + case certificates(Components.Schemas.Certificate) + /// - Remark: Generated from `#/components/schemas/ProfileResponse/IncludedPayload/Device`. + case devices(Components.Schemas.Device) + public enum CodingKeys: String, CodingKey { + case _type = "type" + } + public init(from decoder: any Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + let discriminator = try container.decode( + Swift.String.self, + forKey: ._type + ) + switch discriminator { + case "bundleIds": + self = .bundleIds(try .init(from: decoder)) + case "certificates": + self = .certificates(try .init(from: decoder)) + case "devices": + self = .devices(try .init(from: decoder)) + default: + throw Swift.DecodingError.unknownOneOfDiscriminator( + discriminatorKey: CodingKeys._type, + discriminatorValue: discriminator, + codingPath: decoder.codingPath + ) + } + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .bundleIds(value): + try value.encode(to: encoder) + case let .certificates(value): + try value.encode(to: encoder) + case let .devices(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/ProfileResponse/included`. + public typealias IncludedPayload = [Components.Schemas.ProfileResponse.IncludedPayloadPayload] + /// - Remark: Generated from `#/components/schemas/ProfileResponse/included`. + public var included: Components.Schemas.ProfileResponse.IncludedPayload? + /// - Remark: Generated from `#/components/schemas/ProfileResponse/links`. + public var links: Components.Schemas.DocumentLinks + /// Creates a new `ProfileResponse`. + /// + /// - Parameters: + /// - data: + /// - included: + /// - links: + public init( + data: Components.Schemas.Profile, + included: Components.Schemas.ProfileResponse.IncludedPayload? = nil, + links: Components.Schemas.DocumentLinks + ) { + self.data = data + self.included = included + self.links = links + } + public enum CodingKeys: String, CodingKey { + case data + case included + case links + } + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest`. + public struct ProfileCreateRequest: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case profiles = "profiles" + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/type`. + public var _type: Components.Schemas.ProfileCreateRequest.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes`. + public struct AttributesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes/name`. + public var name: Swift.String + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes/profileType`. + public struct ProfileTypePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes/profileType/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, 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" + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes/profileType/value1`. + public var value1: Components.Schemas.ProfileCreateRequest.DataPayload.AttributesPayload.ProfileTypePayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes/profileType/value2`. + public var value2: Swift.String? + /// Creates a new `ProfileTypePayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.ProfileCreateRequest.DataPayload.AttributesPayload.ProfileTypePayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes/profileType`. + public var profileType: Components.Schemas.ProfileCreateRequest.DataPayload.AttributesPayload.ProfileTypePayload + /// Creates a new `AttributesPayload`. + /// + /// - Parameters: + /// - name: + /// - profileType: + public init( + name: Swift.String, + profileType: Components.Schemas.ProfileCreateRequest.DataPayload.AttributesPayload.ProfileTypePayload + ) { + self.name = name + self.profileType = profileType + } + public enum CodingKeys: String, CodingKey { + case name + case profileType + } + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/attributes`. + public var attributes: Components.Schemas.ProfileCreateRequest.DataPayload.AttributesPayload + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships`. + public struct RelationshipsPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/bundleId`. + public struct BundleIdPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/bundleId/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/bundleId/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case bundleIds = "bundleIds" + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/bundleId/data/type`. + public var _type: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/bundleId/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/bundleId/data`. + public var data: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload + /// Creates a new `BundleIdPayload`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload.DataPayload) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/bundleId`. + public var bundleId: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices`. + public struct DevicesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case devices = "devices" + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices/DataPayload/type`. + public var _type: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.DevicesPayload.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.DevicesPayload.DataPayloadPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices/data`. + public typealias DataPayload = [Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.DevicesPayload.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices/data`. + public var data: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.DevicesPayload.DataPayload? + /// Creates a new `DevicesPayload`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.DevicesPayload.DataPayload? = nil) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/devices`. + public var devices: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.DevicesPayload? + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates`. + public struct CertificatesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case certificates = "certificates" + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates/DataPayload/type`. + public var _type: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.CertificatesPayload.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.CertificatesPayload.DataPayloadPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates/data`. + public typealias DataPayload = [Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.CertificatesPayload.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates/data`. + public var data: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.CertificatesPayload.DataPayload + /// Creates a new `CertificatesPayload`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.CertificatesPayload.DataPayload) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships/certificates`. + public var certificates: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.CertificatesPayload + /// Creates a new `RelationshipsPayload`. + /// + /// - Parameters: + /// - bundleId: + /// - devices: + /// - certificates: + public init( + bundleId: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload, + devices: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.DevicesPayload? = nil, + certificates: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.CertificatesPayload + ) { + self.bundleId = bundleId + self.devices = devices + self.certificates = certificates + } + public enum CodingKeys: String, CodingKey { + case bundleId + case devices + case certificates + } + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships`. + public var relationships: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - attributes: + /// - relationships: + public init( + _type: Components.Schemas.ProfileCreateRequest.DataPayload._TypePayload, + attributes: Components.Schemas.ProfileCreateRequest.DataPayload.AttributesPayload, + relationships: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload + ) { + self._type = _type + self.attributes = attributes + self.relationships = relationships + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case attributes + case relationships + } + } + /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data`. + public var data: Components.Schemas.ProfileCreateRequest.DataPayload + /// Creates a new `ProfileCreateRequest`. + /// + /// - Parameters: + /// - data: + public init(data: Components.Schemas.ProfileCreateRequest.DataPayload) { + self.data = data + } + public enum CodingKeys: String, CodingKey { + case data + } + } + /// - Remark: Generated from `#/components/schemas/AppWithoutIncludesResponse`. + public struct AppWithoutIncludesResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/AppWithoutIncludesResponse/data`. + public var data: Components.Schemas.App + /// - Remark: Generated from `#/components/schemas/AppWithoutIncludesResponse/links`. + public var links: Components.Schemas.DocumentLinks + /// Creates a new `AppWithoutIncludesResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + public init( + data: Components.Schemas.App, + links: Components.Schemas.DocumentLinks + ) { + self.data = data + self.links = links + } + public enum CodingKeys: String, CodingKey { + case data + case links + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdAppLinkageResponse`. + public struct BundleIdAppLinkageResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdAppLinkageResponse/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdAppLinkageResponse/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case apps = "apps" + } + /// - Remark: Generated from `#/components/schemas/BundleIdAppLinkageResponse/data/type`. + public var _type: Components.Schemas.BundleIdAppLinkageResponse.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BundleIdAppLinkageResponse/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.BundleIdAppLinkageResponse.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdAppLinkageResponse/data`. + public var data: Components.Schemas.BundleIdAppLinkageResponse.DataPayload + /// - Remark: Generated from `#/components/schemas/BundleIdAppLinkageResponse/links`. + public var links: Components.Schemas.DocumentLinks + /// Creates a new `BundleIdAppLinkageResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + public init( + data: Components.Schemas.BundleIdAppLinkageResponse.DataPayload, + links: Components.Schemas.DocumentLinks + ) { + self.data = data + self.links = links + } + public enum CodingKeys: String, CodingKey { + case data + case links + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilitiesWithoutIncludesResponse`. + public struct BundleIdCapabilitiesWithoutIncludesResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilitiesWithoutIncludesResponse/data`. + public var data: [Components.Schemas.BundleIdCapability] + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilitiesWithoutIncludesResponse/links`. + public var links: Components.Schemas.PagedDocumentLinks + /// - Remark: Generated from `#/components/schemas/BundleIdCapabilitiesWithoutIncludesResponse/meta`. + public var meta: Components.Schemas.PagingInformation? + /// Creates a new `BundleIdCapabilitiesWithoutIncludesResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + /// - meta: + public init( + data: [Components.Schemas.BundleIdCapability], + links: Components.Schemas.PagedDocumentLinks, + meta: Components.Schemas.PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + public enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse`. + public struct BundleIdBundleIdCapabilitiesLinkagesResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case bundleIdCapabilities = "bundleIdCapabilities" + } + /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/DataPayload/type`. + public var _type: Components.Schemas.BundleIdBundleIdCapabilitiesLinkagesResponse.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.BundleIdBundleIdCapabilitiesLinkagesResponse.DataPayloadPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/data`. + public typealias DataPayload = [Components.Schemas.BundleIdBundleIdCapabilitiesLinkagesResponse.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/data`. + public var data: Components.Schemas.BundleIdBundleIdCapabilitiesLinkagesResponse.DataPayload + /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/links`. + public var links: Components.Schemas.PagedDocumentLinks + /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/meta`. + public var meta: Components.Schemas.PagingInformation? + /// Creates a new `BundleIdBundleIdCapabilitiesLinkagesResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + /// - meta: + public init( + data: Components.Schemas.BundleIdBundleIdCapabilitiesLinkagesResponse.DataPayload, + links: Components.Schemas.PagedDocumentLinks, + meta: Components.Schemas.PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + public enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + } + /// - Remark: Generated from `#/components/schemas/ProfilesWithoutIncludesResponse`. + public struct ProfilesWithoutIncludesResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfilesWithoutIncludesResponse/data`. + public var data: [Components.Schemas.Profile] + /// - Remark: Generated from `#/components/schemas/ProfilesWithoutIncludesResponse/links`. + public var links: Components.Schemas.PagedDocumentLinks + /// - Remark: Generated from `#/components/schemas/ProfilesWithoutIncludesResponse/meta`. + public var meta: Components.Schemas.PagingInformation? + /// Creates a new `ProfilesWithoutIncludesResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + /// - meta: + public init( + data: [Components.Schemas.Profile], + links: Components.Schemas.PagedDocumentLinks, + meta: Components.Schemas.PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + public enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse`. + public struct BundleIdProfilesLinkagesResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case profiles = "profiles" + } + /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/DataPayload/type`. + public var _type: Components.Schemas.BundleIdProfilesLinkagesResponse.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.BundleIdProfilesLinkagesResponse.DataPayloadPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/data`. + public typealias DataPayload = [Components.Schemas.BundleIdProfilesLinkagesResponse.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/data`. + public var data: Components.Schemas.BundleIdProfilesLinkagesResponse.DataPayload + /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/links`. + public var links: Components.Schemas.PagedDocumentLinks + /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/meta`. + public var meta: Components.Schemas.PagingInformation? + /// Creates a new `BundleIdProfilesLinkagesResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + /// - meta: + public init( + data: Components.Schemas.BundleIdProfilesLinkagesResponse.DataPayload, + links: Components.Schemas.PagedDocumentLinks, + meta: Components.Schemas.PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + public enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + } + /// - Remark: Generated from `#/components/schemas/CertificatePassTypeIdLinkageResponse`. + public struct CertificatePassTypeIdLinkageResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificatePassTypeIdLinkageResponse/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificatePassTypeIdLinkageResponse/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case passTypeIds = "passTypeIds" + } + /// - Remark: Generated from `#/components/schemas/CertificatePassTypeIdLinkageResponse/data/type`. + public var _type: Components.Schemas.CertificatePassTypeIdLinkageResponse.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/CertificatePassTypeIdLinkageResponse/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.CertificatePassTypeIdLinkageResponse.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/CertificatePassTypeIdLinkageResponse/data`. + public var data: Components.Schemas.CertificatePassTypeIdLinkageResponse.DataPayload + /// - Remark: Generated from `#/components/schemas/CertificatePassTypeIdLinkageResponse/links`. + public var links: Components.Schemas.DocumentLinks + /// Creates a new `CertificatePassTypeIdLinkageResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + public init( + data: Components.Schemas.CertificatePassTypeIdLinkageResponse.DataPayload, + links: Components.Schemas.DocumentLinks + ) { + self.data = data + self.links = links + } + public enum CodingKeys: String, CodingKey { + case data + case links + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdWithoutIncludesResponse`. + public struct BundleIdWithoutIncludesResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdWithoutIncludesResponse/data`. + public var data: Components.Schemas.BundleId + /// - Remark: Generated from `#/components/schemas/BundleIdWithoutIncludesResponse/links`. + public var links: Components.Schemas.DocumentLinks + /// Creates a new `BundleIdWithoutIncludesResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + public init( + data: Components.Schemas.BundleId, + links: Components.Schemas.DocumentLinks + ) { + self.data = data + self.links = links + } + public enum CodingKeys: String, CodingKey { + case data + case links + } + } + /// - Remark: Generated from `#/components/schemas/ProfileBundleIdLinkageResponse`. + public struct ProfileBundleIdLinkageResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileBundleIdLinkageResponse/data`. + public struct DataPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileBundleIdLinkageResponse/data/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case bundleIds = "bundleIds" + } + /// - Remark: Generated from `#/components/schemas/ProfileBundleIdLinkageResponse/data/type`. + public var _type: Components.Schemas.ProfileBundleIdLinkageResponse.DataPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/ProfileBundleIdLinkageResponse/data/id`. + public var id: Swift.String + /// Creates a new `DataPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.ProfileBundleIdLinkageResponse.DataPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/ProfileBundleIdLinkageResponse/data`. + public var data: Components.Schemas.ProfileBundleIdLinkageResponse.DataPayload + /// - Remark: Generated from `#/components/schemas/ProfileBundleIdLinkageResponse/links`. + public var links: Components.Schemas.DocumentLinks + /// Creates a new `ProfileBundleIdLinkageResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + public init( + data: Components.Schemas.ProfileBundleIdLinkageResponse.DataPayload, + links: Components.Schemas.DocumentLinks + ) { + self.data = data + self.links = links + } + public enum CodingKeys: String, CodingKey { + case data + case links + } + } + /// - Remark: Generated from `#/components/schemas/CertificatesWithoutIncludesResponse`. + public struct CertificatesWithoutIncludesResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificatesWithoutIncludesResponse/data`. + public var data: [Components.Schemas.Certificate] + /// - Remark: Generated from `#/components/schemas/CertificatesWithoutIncludesResponse/links`. + public var links: Components.Schemas.PagedDocumentLinks + /// - Remark: Generated from `#/components/schemas/CertificatesWithoutIncludesResponse/meta`. + public var meta: Components.Schemas.PagingInformation? + /// Creates a new `CertificatesWithoutIncludesResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + /// - meta: + public init( + data: [Components.Schemas.Certificate], + links: Components.Schemas.PagedDocumentLinks, + meta: Components.Schemas.PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + public enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + } + /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse`. + public struct ProfileCertificatesLinkagesResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case certificates = "certificates" + } + /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/DataPayload/type`. + public var _type: Components.Schemas.ProfileCertificatesLinkagesResponse.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.ProfileCertificatesLinkagesResponse.DataPayloadPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/data`. + public typealias DataPayload = [Components.Schemas.ProfileCertificatesLinkagesResponse.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/data`. + public var data: Components.Schemas.ProfileCertificatesLinkagesResponse.DataPayload + /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/links`. + public var links: Components.Schemas.PagedDocumentLinks + /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/meta`. + public var meta: Components.Schemas.PagingInformation? + /// Creates a new `ProfileCertificatesLinkagesResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + /// - meta: + public init( + data: Components.Schemas.ProfileCertificatesLinkagesResponse.DataPayload, + links: Components.Schemas.PagedDocumentLinks, + meta: Components.Schemas.PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + public enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + } + /// - Remark: Generated from `#/components/schemas/DevicesWithoutIncludesResponse`. + public struct DevicesWithoutIncludesResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/DevicesWithoutIncludesResponse/data`. + public var data: [Components.Schemas.Device] + /// - Remark: Generated from `#/components/schemas/DevicesWithoutIncludesResponse/links`. + public var links: Components.Schemas.PagedDocumentLinks + /// - Remark: Generated from `#/components/schemas/DevicesWithoutIncludesResponse/meta`. + public var meta: Components.Schemas.PagingInformation? + /// Creates a new `DevicesWithoutIncludesResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + /// - meta: + public init( + data: [Components.Schemas.Device], + links: Components.Schemas.PagedDocumentLinks, + meta: Components.Schemas.PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + public enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + } + /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse`. + public struct ProfileDevicesLinkagesResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/DataPayload`. + public struct DataPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/DataPayload/type`. + @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { + case devices = "devices" + } + /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/DataPayload/type`. + public var _type: Components.Schemas.ProfileDevicesLinkagesResponse.DataPayloadPayload._TypePayload + /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/DataPayload/id`. + public var id: Swift.String + /// Creates a new `DataPayloadPayload`. + /// + /// - Parameters: + /// - _type: + /// - id: + public init( + _type: Components.Schemas.ProfileDevicesLinkagesResponse.DataPayloadPayload._TypePayload, + id: Swift.String + ) { + self._type = _type + self.id = id + } + public enum CodingKeys: String, CodingKey { + case _type = "type" + case id + } + } + /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/data`. + public typealias DataPayload = [Components.Schemas.ProfileDevicesLinkagesResponse.DataPayloadPayload] + /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/data`. + public var data: Components.Schemas.ProfileDevicesLinkagesResponse.DataPayload + /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/links`. + public var links: Components.Schemas.PagedDocumentLinks + /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/meta`. + public var meta: Components.Schemas.PagingInformation? + /// Creates a new `ProfileDevicesLinkagesResponse`. + /// + /// - Parameters: + /// - data: + /// - links: + /// - meta: + public init( + data: Components.Schemas.ProfileDevicesLinkagesResponse.DataPayload, + links: Components.Schemas.PagedDocumentLinks, + meta: Components.Schemas.PagingInformation? = nil + ) { + self.data = data + self.links = links + self.meta = meta + } + public enum CodingKeys: String, CodingKey { + case data + case links + case meta + } + } + /// - Remark: Generated from `#/components/schemas/ErrorResponse`. + public struct ErrorResponse: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload`. + public struct ErrorsPayloadPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/id`. + public var id: Swift.String? + /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/status`. + public var status: Swift.String + /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/code`. + public var code: Swift.String + /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/title`. + public var title: Swift.String + /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/detail`. + public var detail: Swift.String + /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/source`. + @frozen public enum SourcePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/source/case1`. + case ErrorSourcePointer(Components.Schemas.ErrorSourcePointer) + /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/source/case2`. + case ErrorSourceParameter(Components.Schemas.ErrorSourceParameter) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .ErrorSourcePointer(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + do { + self = .ErrorSourceParameter(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .ErrorSourcePointer(value): + try value.encode(to: encoder) + case let .ErrorSourceParameter(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/source`. + public var source: Components.Schemas.ErrorResponse.ErrorsPayloadPayload.SourcePayload? + /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/links`. + public var links: Components.Schemas.ErrorLinks? + /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/meta`. + public struct MetaPayload: Codable, Hashable, Sendable { + /// A container of undocumented properties. + public var additionalProperties: [String: OpenAPIRuntime.OpenAPIValueContainer] + /// Creates a new `MetaPayload`. + /// + /// - Parameters: + /// - additionalProperties: A container of undocumented properties. + public init(additionalProperties: [String: OpenAPIRuntime.OpenAPIValueContainer] = .init()) { + self.additionalProperties = additionalProperties + } + public init(from decoder: any Decoder) throws { + additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: []) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeAdditionalProperties(additionalProperties) + } + } + /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/meta`. + public var meta: Components.Schemas.ErrorResponse.ErrorsPayloadPayload.MetaPayload? + /// Creates a new `ErrorsPayloadPayload`. + /// + /// - Parameters: + /// - id: + /// - status: + /// - code: + /// - title: + /// - detail: + /// - source: + /// - links: + /// - meta: + public init( + id: Swift.String? = nil, + status: Swift.String, + code: Swift.String, + title: Swift.String, + detail: Swift.String, + source: Components.Schemas.ErrorResponse.ErrorsPayloadPayload.SourcePayload? = nil, + links: Components.Schemas.ErrorLinks? = nil, + meta: Components.Schemas.ErrorResponse.ErrorsPayloadPayload.MetaPayload? = nil + ) { + self.id = id + self.status = status + self.code = code + self.title = title + self.detail = detail + self.source = source + self.links = links + self.meta = meta + } + public enum CodingKeys: String, CodingKey { + case id + case status + case code + case title + case detail + case source + case links + case meta + } + } + /// - Remark: Generated from `#/components/schemas/ErrorResponse/errors`. + public typealias ErrorsPayload = [Components.Schemas.ErrorResponse.ErrorsPayloadPayload] + /// - Remark: Generated from `#/components/schemas/ErrorResponse/errors`. + public var errors: Components.Schemas.ErrorResponse.ErrorsPayload? + /// Creates a new `ErrorResponse`. + /// + /// - Parameters: + /// - errors: + public init(errors: Components.Schemas.ErrorResponse.ErrorsPayload? = nil) { + self.errors = errors + } + public enum CodingKeys: String, CodingKey { + case errors + } + } + /// - Remark: Generated from `#/components/schemas/ErrorSourceParameter`. + public struct ErrorSourceParameter: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ErrorSourceParameter/parameter`. + public var parameter: Swift.String + /// Creates a new `ErrorSourceParameter`. + /// + /// - Parameters: + /// - parameter: + public init(parameter: Swift.String) { + self.parameter = parameter + } + public enum CodingKeys: String, CodingKey { + case parameter + } + } + /// - Remark: Generated from `#/components/schemas/ErrorSourcePointer`. + public struct ErrorSourcePointer: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ErrorSourcePointer/pointer`. + public var pointer: Swift.String + /// Creates a new `ErrorSourcePointer`. + /// + /// - Parameters: + /// - pointer: + public init(pointer: Swift.String) { + self.pointer = pointer + } + public enum CodingKeys: String, CodingKey { + case pointer + } + } + /// - Remark: Generated from `#/components/schemas/ErrorLinks`. + public struct ErrorLinks: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ErrorLinks/about`. + public var about: Swift.String? + /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated`. + @frozen public enum AssociatedPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated/case1`. + case case1(Swift.String) + /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated/case2`. + public struct Case2Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated/case2/href`. + public var href: Swift.String? + /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated/case2/meta`. + public struct MetaPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated/case2/meta/source`. + public var source: Swift.String? + /// Creates a new `MetaPayload`. + /// + /// - Parameters: + /// - source: + public init(source: Swift.String? = nil) { + self.source = source + } + public enum CodingKeys: String, CodingKey { + case source + } + } + /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated/case2/meta`. + public var meta: Components.Schemas.ErrorLinks.AssociatedPayload.Case2Payload.MetaPayload? + /// Creates a new `Case2Payload`. + /// + /// - Parameters: + /// - href: + /// - meta: + public init( + href: Swift.String? = nil, + meta: Components.Schemas.ErrorLinks.AssociatedPayload.Case2Payload.MetaPayload? = nil + ) { + self.href = href + self.meta = meta + } + public enum CodingKeys: String, CodingKey { + case href + case meta + } + } + /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated/case2`. + case case2(Components.Schemas.ErrorLinks.AssociatedPayload.Case2Payload) + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self = .case1(try decoder.decodeFromSingleValueContainer()) + return + } catch { + errors.append(error) + } + do { + self = .case2(try .init(from: decoder)) + return + } catch { + errors.append(error) + } + throw Swift.DecodingError.failedToDecodeOneOfSchema( + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + switch self { + case let .case1(value): + try encoder.encodeToSingleValueContainer(value) + case let .case2(value): + try value.encode(to: encoder) + } + } + } + /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated`. + public var associated: Components.Schemas.ErrorLinks.AssociatedPayload? + /// Creates a new `ErrorLinks`. + /// + /// - Parameters: + /// - about: + /// - associated: + public init( + about: Swift.String? = nil, + associated: Components.Schemas.ErrorLinks.AssociatedPayload? = nil + ) { + self.about = about + self.associated = associated + } + public enum CodingKeys: String, CodingKey { + case about + case associated + } + } + /// - Remark: Generated from `#/components/schemas/PagedDocumentLinks`. + public struct PagedDocumentLinks: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/PagedDocumentLinks/self`. + public var _self: Swift.String + /// - Remark: Generated from `#/components/schemas/PagedDocumentLinks/first`. + public var first: Swift.String? + /// - Remark: Generated from `#/components/schemas/PagedDocumentLinks/next`. + public var next: Swift.String? + /// Creates a new `PagedDocumentLinks`. + /// + /// - Parameters: + /// - _self: + /// - first: + /// - next: + public init( + _self: Swift.String, + first: Swift.String? = nil, + next: Swift.String? = nil + ) { + self._self = _self + self.first = first + self.next = next + } + public enum CodingKeys: String, CodingKey { + case _self = "self" + case first + case next + } + } + /// - Remark: Generated from `#/components/schemas/PagingInformation`. + public struct PagingInformation: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/PagingInformation/paging`. + public struct PagingPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/PagingInformation/paging/total`. + public var total: Swift.Int? + /// - Remark: Generated from `#/components/schemas/PagingInformation/paging/limit`. + public var limit: Swift.Int + /// - Remark: Generated from `#/components/schemas/PagingInformation/paging/nextCursor`. + public var nextCursor: Swift.String? + /// Creates a new `PagingPayload`. + /// + /// - Parameters: + /// - total: + /// - limit: + /// - nextCursor: + public init( + total: Swift.Int? = nil, + limit: Swift.Int, + nextCursor: Swift.String? = nil + ) { + self.total = total + self.limit = limit + self.nextCursor = nextCursor + } + public enum CodingKeys: String, CodingKey { + case total + case limit + case nextCursor + } + } + /// - Remark: Generated from `#/components/schemas/PagingInformation/paging`. + public var paging: Components.Schemas.PagingInformation.PagingPayload + /// Creates a new `PagingInformation`. + /// + /// - Parameters: + /// - paging: + public init(paging: Components.Schemas.PagingInformation.PagingPayload) { + self.paging = paging + } + public enum CodingKeys: String, CodingKey { + case paging + } + } + /// - Remark: Generated from `#/components/schemas/DocumentLinks`. + public struct DocumentLinks: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/DocumentLinks/self`. + public var _self: Swift.String + /// Creates a new `DocumentLinks`. + /// + /// - Parameters: + /// - _self: + public init(_self: Swift.String) { + self._self = _self + } + public enum CodingKeys: String, CodingKey { + case _self = "self" + } + } + /// - Remark: Generated from `#/components/schemas/ResourceLinks`. + public struct ResourceLinks: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ResourceLinks/self`. + public var _self: Swift.String? + /// Creates a new `ResourceLinks`. + /// + /// - Parameters: + /// - _self: + public init(_self: Swift.String? = nil) { + self._self = _self + } + public enum CodingKeys: String, CodingKey { + case _self = "self" + } + } + /// - Remark: Generated from `#/components/schemas/RelationshipLinks`. + public struct RelationshipLinks: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/RelationshipLinks/self`. + public var _self: Swift.String? + /// - Remark: Generated from `#/components/schemas/RelationshipLinks/related`. + public var related: Swift.String? + /// Creates a new `RelationshipLinks`. + /// + /// - Parameters: + /// - _self: + /// - related: + public init( + _self: Swift.String? = nil, + related: Swift.String? = nil + ) { + self._self = _self + self.related = related + } + public enum CodingKeys: String, CodingKey { + case _self = "self" + case related + } + } + /// - Remark: Generated from `#/components/schemas/AppMediaAssetState`. + public struct AppMediaAssetState: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/AppMediaAssetState/errors`. + public var errors: [Components.Schemas.AppMediaStateError]? + /// - Remark: Generated from `#/components/schemas/AppMediaAssetState/warnings`. + public var warnings: [Components.Schemas.AppMediaStateError]? + /// - Remark: Generated from `#/components/schemas/AppMediaAssetState/state`. + public struct StatePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/AppMediaAssetState/state/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case awaitingUpload = "AWAITING_UPLOAD" + case uploadComplete = "UPLOAD_COMPLETE" + case complete = "COMPLETE" + case failed = "FAILED" + } + /// - Remark: Generated from `#/components/schemas/AppMediaAssetState/state/value1`. + public var value1: Components.Schemas.AppMediaAssetState.StatePayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/AppMediaAssetState/state/value2`. + public var value2: Swift.String? + /// Creates a new `StatePayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.AppMediaAssetState.StatePayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/AppMediaAssetState/state`. + public var state: Components.Schemas.AppMediaAssetState.StatePayload? + /// Creates a new `AppMediaAssetState`. + /// + /// - Parameters: + /// - errors: + /// - warnings: + /// - state: + public init( + errors: [Components.Schemas.AppMediaStateError]? = nil, + warnings: [Components.Schemas.AppMediaStateError]? = nil, + state: Components.Schemas.AppMediaAssetState.StatePayload? = nil + ) { + self.errors = errors + self.warnings = warnings + self.state = state + } + public enum CodingKeys: String, CodingKey { + case errors + case warnings + case state + } + } + /// - Remark: Generated from `#/components/schemas/AppMediaStateError`. + public struct AppMediaStateError: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/AppMediaStateError/code`. + public var code: Swift.String? + /// - Remark: Generated from `#/components/schemas/AppMediaStateError/description`. + public var description: Swift.String? + /// Creates a new `AppMediaStateError`. + /// + /// - Parameters: + /// - code: + /// - description: + public init( + code: Swift.String? = nil, + description: Swift.String? = nil + ) { + self.code = code + self.description = description + } + public enum CodingKeys: String, CodingKey { + case code + case description + } + } + /// - Remark: Generated from `#/components/schemas/BuildAudienceType`. + public struct BuildAudienceType: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildAudienceType/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case internalOnly = "INTERNAL_ONLY" + case appStoreEligible = "APP_STORE_ELIGIBLE" + } + /// - Remark: Generated from `#/components/schemas/BuildAudienceType/value1`. + public var value1: Components.Schemas.BuildAudienceType.Value1Payload? + /// - Remark: Generated from `#/components/schemas/BuildAudienceType/value2`. + public var value2: Swift.String? + /// Creates a new `BuildAudienceType`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.BuildAudienceType.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/BuildUploadState`. + public struct BuildUploadState: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BuildUploadState/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case awaitingUpload = "AWAITING_UPLOAD" + case processing = "PROCESSING" + case failed = "FAILED" + case complete = "COMPLETE" + } + /// - Remark: Generated from `#/components/schemas/BuildUploadState/value1`. + public var value1: Components.Schemas.BuildUploadState.Value1Payload? + /// - Remark: Generated from `#/components/schemas/BuildUploadState/value2`. + public var value2: Swift.String? + /// Creates a new `BuildUploadState`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.BuildUploadState.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/BundleIdPlatform`. + public struct BundleIdPlatform: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/BundleIdPlatform/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case ios = "IOS" + case macOs = "MAC_OS" + case universal = "UNIVERSAL" + } + /// - Remark: Generated from `#/components/schemas/BundleIdPlatform/value1`. + public var value1: Components.Schemas.BundleIdPlatform.Value1Payload? + /// - Remark: Generated from `#/components/schemas/BundleIdPlatform/value2`. + public var value2: Swift.String? + /// Creates a new `BundleIdPlatform`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.BundleIdPlatform.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/CapabilityOption`. + public struct CapabilityOption: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CapabilityOption/key`. + public struct KeyPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CapabilityOption/key/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, 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" + } + /// - Remark: Generated from `#/components/schemas/CapabilityOption/key/value1`. + public var value1: Components.Schemas.CapabilityOption.KeyPayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/CapabilityOption/key/value2`. + public var value2: Swift.String? + /// Creates a new `KeyPayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.CapabilityOption.KeyPayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/CapabilityOption/key`. + public var key: Components.Schemas.CapabilityOption.KeyPayload? + /// - Remark: Generated from `#/components/schemas/CapabilityOption/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/CapabilityOption/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/CapabilityOption/enabledByDefault`. + public var enabledByDefault: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/CapabilityOption/enabled`. + public var enabled: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/CapabilityOption/supportsWildcard`. + public var supportsWildcard: Swift.Bool? + /// Creates a new `CapabilityOption`. + /// + /// - Parameters: + /// - key: + /// - name: + /// - description: + /// - enabledByDefault: + /// - enabled: + /// - supportsWildcard: + public init( + key: Components.Schemas.CapabilityOption.KeyPayload? = nil, + name: Swift.String? = nil, + description: Swift.String? = nil, + enabledByDefault: Swift.Bool? = nil, + enabled: Swift.Bool? = nil, + supportsWildcard: Swift.Bool? = nil + ) { + self.key = key + self.name = name + self.description = description + self.enabledByDefault = enabledByDefault + self.enabled = enabled + self.supportsWildcard = supportsWildcard + } + public enum CodingKeys: String, CodingKey { + case key + case name + case description + case enabledByDefault + case enabled + case supportsWildcard + } + } + /// - Remark: Generated from `#/components/schemas/CapabilitySetting`. + public struct CapabilitySetting: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/key`. + public struct KeyPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/key/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case icloudVersion = "ICLOUD_VERSION" + case dataProtectionPermissionLevel = "DATA_PROTECTION_PERMISSION_LEVEL" + case appleIdAuthAppConsent = "APPLE_ID_AUTH_APP_CONSENT" + } + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/key/value1`. + public var value1: Components.Schemas.CapabilitySetting.KeyPayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/key/value2`. + public var value2: Swift.String? + /// Creates a new `KeyPayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.CapabilitySetting.KeyPayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/key`. + public var key: Components.Schemas.CapabilitySetting.KeyPayload? + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/description`. + public var description: Swift.String? + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/enabledByDefault`. + public var enabledByDefault: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/visible`. + public var visible: Swift.Bool? + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/allowedInstances`. + public struct AllowedInstancesPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/allowedInstances/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case entry = "ENTRY" + case single = "SINGLE" + case multiple = "MULTIPLE" + } + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/allowedInstances/value1`. + public var value1: Components.Schemas.CapabilitySetting.AllowedInstancesPayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/allowedInstances/value2`. + public var value2: Swift.String? + /// Creates a new `AllowedInstancesPayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.CapabilitySetting.AllowedInstancesPayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/allowedInstances`. + public var allowedInstances: Components.Schemas.CapabilitySetting.AllowedInstancesPayload? + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/minInstances`. + public var minInstances: Swift.Int? + /// - Remark: Generated from `#/components/schemas/CapabilitySetting/options`. + public var options: [Components.Schemas.CapabilityOption]? + /// Creates a new `CapabilitySetting`. + /// + /// - Parameters: + /// - key: + /// - name: + /// - description: + /// - enabledByDefault: + /// - visible: + /// - allowedInstances: + /// - minInstances: + /// - options: + public init( + key: Components.Schemas.CapabilitySetting.KeyPayload? = nil, + name: Swift.String? = nil, + description: Swift.String? = nil, + enabledByDefault: Swift.Bool? = nil, + visible: Swift.Bool? = nil, + allowedInstances: Components.Schemas.CapabilitySetting.AllowedInstancesPayload? = nil, + minInstances: Swift.Int? = nil, + options: [Components.Schemas.CapabilityOption]? = nil + ) { + self.key = key + self.name = name + self.description = description + self.enabledByDefault = enabledByDefault + self.visible = visible + self.allowedInstances = allowedInstances + self.minInstances = minInstances + self.options = options + } + public enum CodingKeys: String, CodingKey { + case key + case name + case description + case enabledByDefault + case visible + case allowedInstances + case minInstances + case options + } + } + /// - Remark: Generated from `#/components/schemas/CapabilityType`. + public struct CapabilityType: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CapabilityType/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, 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" + } + /// - Remark: Generated from `#/components/schemas/CapabilityType/value1`. + public var value1: Components.Schemas.CapabilityType.Value1Payload? + /// - Remark: Generated from `#/components/schemas/CapabilityType/value2`. + public var value2: Swift.String? + /// Creates a new `CapabilityType`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.CapabilityType.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/CertificateType`. + public struct CertificateType: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/CertificateType/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case applePay = "APPLE_PAY" + case applePayMerchantIdentity = "APPLE_PAY_MERCHANT_IDENTITY" + case applePayPspIdentity = "APPLE_PAY_PSP_IDENTITY" + case applePayRsa = "APPLE_PAY_RSA" + case developerIdKext = "DEVELOPER_ID_KEXT" + case developerIdKextG2 = "DEVELOPER_ID_KEXT_G2" + case developerIdApplication = "DEVELOPER_ID_APPLICATION" + case developerIdApplicationG2 = "DEVELOPER_ID_APPLICATION_G2" + case development = "DEVELOPMENT" + case distribution = "DISTRIBUTION" + case identityAccess = "IDENTITY_ACCESS" + case iosDevelopment = "IOS_DEVELOPMENT" + case iosDistribution = "IOS_DISTRIBUTION" + case macAppDistribution = "MAC_APP_DISTRIBUTION" + case macInstallerDistribution = "MAC_INSTALLER_DISTRIBUTION" + case macAppDevelopment = "MAC_APP_DEVELOPMENT" + case passTypeId = "PASS_TYPE_ID" + case passTypeIdWithNfc = "PASS_TYPE_ID_WITH_NFC" + } + /// - Remark: Generated from `#/components/schemas/CertificateType/value1`. + public var value1: Components.Schemas.CertificateType.Value1Payload? + /// - Remark: Generated from `#/components/schemas/CertificateType/value2`. + public var value2: Swift.String? + /// Creates a new `CertificateType`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.CertificateType.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/ChecksumAlgorithm`. + public struct ChecksumAlgorithm: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ChecksumAlgorithm/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case md5 = "MD5" + case sha256 = "SHA_256" + } + /// - Remark: Generated from `#/components/schemas/ChecksumAlgorithm/value1`. + public var value1: Components.Schemas.ChecksumAlgorithm.Value1Payload? + /// - Remark: Generated from `#/components/schemas/ChecksumAlgorithm/value2`. + public var value2: Swift.String? + /// Creates a new `ChecksumAlgorithm`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.ChecksumAlgorithm.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/Checksums`. + public struct Checksums: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Checksums/file`. + public struct FilePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Checksums/file/hash`. + public var hash: Swift.String? + /// - Remark: Generated from `#/components/schemas/Checksums/file/algorithm`. + public var algorithm: Components.Schemas.ChecksumAlgorithm? + /// Creates a new `FilePayload`. + /// + /// - Parameters: + /// - hash: + /// - algorithm: + public init( + hash: Swift.String? = nil, + algorithm: Components.Schemas.ChecksumAlgorithm? = nil + ) { + self.hash = hash + self.algorithm = algorithm + } + public enum CodingKeys: String, CodingKey { + case hash + case algorithm + } + } + /// - Remark: Generated from `#/components/schemas/Checksums/file`. + public var file: Components.Schemas.Checksums.FilePayload? + /// - Remark: Generated from `#/components/schemas/Checksums/composite`. + public struct CompositePayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Checksums/composite/hash`. + public var hash: Swift.String? + /// - Remark: Generated from `#/components/schemas/Checksums/composite/algorithm`. + public struct AlgorithmPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Checksums/composite/algorithm/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case md5 = "MD5" + } + /// - Remark: Generated from `#/components/schemas/Checksums/composite/algorithm/value1`. + public var value1: Components.Schemas.Checksums.CompositePayload.AlgorithmPayload.Value1Payload? + /// - Remark: Generated from `#/components/schemas/Checksums/composite/algorithm/value2`. + public var value2: Swift.String? + /// Creates a new `AlgorithmPayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.Checksums.CompositePayload.AlgorithmPayload.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/Checksums/composite/algorithm`. + public var algorithm: Components.Schemas.Checksums.CompositePayload.AlgorithmPayload? + /// Creates a new `CompositePayload`. + /// + /// - Parameters: + /// - hash: + /// - algorithm: + public init( + hash: Swift.String? = nil, + algorithm: Components.Schemas.Checksums.CompositePayload.AlgorithmPayload? = nil + ) { + self.hash = hash + self.algorithm = algorithm + } + public enum CodingKeys: String, CodingKey { + case hash + case algorithm + } + } + /// - Remark: Generated from `#/components/schemas/Checksums/composite`. + public var composite: Components.Schemas.Checksums.CompositePayload? + /// Creates a new `Checksums`. + /// + /// - Parameters: + /// - file: + /// - composite: + public init( + file: Components.Schemas.Checksums.FilePayload? = nil, + composite: Components.Schemas.Checksums.CompositePayload? = nil + ) { + self.file = file + self.composite = composite + } + public enum CodingKeys: String, CodingKey { + case file + case composite + } + } + /// - Remark: Generated from `#/components/schemas/DeliveryFileUploadOperation`. + public struct DeliveryFileUploadOperation: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/DeliveryFileUploadOperation/method`. + public var method: Swift.String? + /// - Remark: Generated from `#/components/schemas/DeliveryFileUploadOperation/url`. + public var url: Swift.String? + /// - Remark: Generated from `#/components/schemas/DeliveryFileUploadOperation/length`. + public var length: Swift.Int64? + /// - Remark: Generated from `#/components/schemas/DeliveryFileUploadOperation/offset`. + public var offset: Swift.Int64? + /// - Remark: Generated from `#/components/schemas/DeliveryFileUploadOperation/requestHeaders`. + public var requestHeaders: [Components.Schemas.HttpHeader]? + /// - Remark: Generated from `#/components/schemas/DeliveryFileUploadOperation/expiration`. + public var expiration: Foundation.Date? + /// - Remark: Generated from `#/components/schemas/DeliveryFileUploadOperation/partNumber`. + public var partNumber: Swift.Int64? + /// - Remark: Generated from `#/components/schemas/DeliveryFileUploadOperation/entityTag`. + public var entityTag: Swift.String? + /// Creates a new `DeliveryFileUploadOperation`. + /// + /// - Parameters: + /// - method: + /// - url: + /// - length: + /// - offset: + /// - requestHeaders: + /// - expiration: + /// - partNumber: + /// - entityTag: + public init( + method: Swift.String? = nil, + url: Swift.String? = nil, + length: Swift.Int64? = nil, + offset: Swift.Int64? = nil, + requestHeaders: [Components.Schemas.HttpHeader]? = nil, + expiration: Foundation.Date? = nil, + partNumber: Swift.Int64? = nil, + entityTag: Swift.String? = nil + ) { + self.method = method + self.url = url + self.length = length + self.offset = offset + self.requestHeaders = requestHeaders + self.expiration = expiration + self.partNumber = partNumber + self.entityTag = entityTag + } + public enum CodingKeys: String, CodingKey { + case method + case url + case length + case offset + case requestHeaders + case expiration + case partNumber + case entityTag + } + } + /// - Remark: Generated from `#/components/schemas/HttpHeader`. + public struct HttpHeader: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/HttpHeader/name`. + public var name: Swift.String? + /// - Remark: Generated from `#/components/schemas/HttpHeader/value`. + public var value: Swift.String? + /// Creates a new `HttpHeader`. + /// + /// - Parameters: + /// - name: + /// - value: + public init( + name: Swift.String? = nil, + value: Swift.String? = nil + ) { + self.name = name + self.value = value + } + public enum CodingKeys: String, CodingKey { + case name + case value + } + } + /// - Remark: Generated from `#/components/schemas/ImageAsset`. + public struct ImageAsset: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ImageAsset/templateUrl`. + public var templateUrl: Swift.String? + /// - Remark: Generated from `#/components/schemas/ImageAsset/width`. + public var width: Swift.Int? + /// - Remark: Generated from `#/components/schemas/ImageAsset/height`. + public var height: Swift.Int? + /// Creates a new `ImageAsset`. + /// + /// - Parameters: + /// - templateUrl: + /// - width: + /// - height: + public init( + templateUrl: Swift.String? = nil, + width: Swift.Int? = nil, + height: Swift.Int? = nil + ) { + self.templateUrl = templateUrl + self.width = width + self.height = height + } + public enum CodingKeys: String, CodingKey { + case templateUrl + case width + case height + } + } + /// - Remark: Generated from `#/components/schemas/Platform`. + public struct Platform: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/Platform/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case ios = "IOS" + case macOs = "MAC_OS" + case tvOs = "TV_OS" + case visionOs = "VISION_OS" + } + /// - Remark: Generated from `#/components/schemas/Platform/value1`. + public var value1: Components.Schemas.Platform.Value1Payload? + /// - Remark: Generated from `#/components/schemas/Platform/value2`. + public var value2: Swift.String? + /// Creates a new `Platform`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.Platform.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + /// - Remark: Generated from `#/components/schemas/StateDetail`. + public struct StateDetail: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/StateDetail/code`. + public var code: Swift.String? + /// - Remark: Generated from `#/components/schemas/StateDetail/description`. + public var description: Swift.String? + /// Creates a new `StateDetail`. + /// + /// - Parameters: + /// - code: + /// - description: + public init( + code: Swift.String? = nil, + description: Swift.String? = nil + ) { + self.code = code + self.description = description + } + public enum CodingKeys: String, CodingKey { + case code + case description + } + } + /// - Remark: Generated from `#/components/schemas/SubscriptionStatusUrlVersion`. + public struct SubscriptionStatusUrlVersion: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/SubscriptionStatusUrlVersion/value1`. + @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { + case v1 = "V1" + case v2 = "V2" + } + /// - Remark: Generated from `#/components/schemas/SubscriptionStatusUrlVersion/value1`. + public var value1: Components.Schemas.SubscriptionStatusUrlVersion.Value1Payload? + /// - Remark: Generated from `#/components/schemas/SubscriptionStatusUrlVersion/value2`. + public var value2: Swift.String? + /// Creates a new `SubscriptionStatusUrlVersion`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.SubscriptionStatusUrlVersion.Value1Payload? = nil, + value2: Swift.String? = nil + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Decoder) throws { + var errors: [any Error] = [] + do { + self.value1 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + do { + self.value2 = try decoder.decodeFromSingleValueContainer() + } catch { + errors.append(error) + } + try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( + [ + self.value1, + self.value2 + ], + type: Self.self, + codingPath: decoder.codingPath, + errors: errors + ) + } + public func encode(to encoder: any Encoder) throws { + try encoder.encodeFirstNonNilValueToSingleValueContainer([ + self.value1, + self.value2 + ]) + } + } + } + /// Types generated from the `#/components/parameters` section of the OpenAPI document. + public enum Parameters {} + /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. + public enum RequestBodies {} + /// Types generated from the `#/components/responses` section of the OpenAPI document. + public enum Responses {} + /// Types generated from the `#/components/headers` section of the OpenAPI document. + public enum Headers {} +} + +/// API operations, with input and output types, generated from `#/paths` in the OpenAPI document. +public enum Operations { + /// - Remark: HTTP `POST /v1/buildUploadFiles`. + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/post(buildUploadFiles_createInstance)`. + public enum BuildUploadFilesCreateInstance { + public static let id: Swift.String = "buildUploadFiles_createInstance" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.BuildUploadFilesCreateInstance.Input.Headers + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/requestBody/content/application\/json`. + case json(Components.Schemas.BuildUploadFileCreateRequest) + } + public var body: Operations.BuildUploadFilesCreateInstance.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - headers: + /// - body: + public init( + headers: Operations.BuildUploadFilesCreateInstance.Input.Headers = .init(), + body: Operations.BuildUploadFilesCreateInstance.Input.Body + ) { + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/responses/201/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/responses/201/content/application\/json`. + case json(Components.Schemas.BuildUploadFileResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.BuildUploadFileResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesCreateInstance.Output.Created.Body + /// Creates a new `Created`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesCreateInstance.Output.Created.Body) { + self.body = body + } + } + /// Single BuildUploadFile + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/post(buildUploadFiles_createInstance)/responses/201`. + /// + /// HTTP response code: `201 created`. + case created(Operations.BuildUploadFilesCreateInstance.Output.Created) + /// The associated value of the enum case if `self` is `.created`. + /// + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.BuildUploadFilesCreateInstance.Output.Created { + get throws { + switch self { + case let .created(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "created", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/responses/400/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesCreateInstance.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesCreateInstance.Output.BadRequest.Body) { + self.body = body + } + } + /// Parameter error(s) + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/post(buildUploadFiles_createInstance)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.BuildUploadFilesCreateInstance.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.BuildUploadFilesCreateInstance.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/responses/401/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesCreateInstance.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesCreateInstance.Output.Unauthorized.Body) { + self.body = body + } + } + /// Unauthorized error(s) + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/post(buildUploadFiles_createInstance)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.BuildUploadFilesCreateInstance.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.BuildUploadFilesCreateInstance.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct Forbidden: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/responses/403/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/responses/403/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesCreateInstance.Output.Forbidden.Body + /// Creates a new `Forbidden`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesCreateInstance.Output.Forbidden.Body) { + self.body = body + } + } + /// Forbidden error + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/post(buildUploadFiles_createInstance)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Operations.BuildUploadFilesCreateInstance.Output.Forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Operations.BuildUploadFilesCreateInstance.Output.Forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/responses/409/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesCreateInstance.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesCreateInstance.Output.Conflict.Body) { + self.body = body + } + } + /// Request entity error(s) + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/post(buildUploadFiles_createInstance)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.BuildUploadFilesCreateInstance.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.BuildUploadFilesCreateInstance.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct UnprocessableContent: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/responses/422/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/responses/422/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesCreateInstance.Output.UnprocessableContent.Body + /// Creates a new `UnprocessableContent`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesCreateInstance.Output.UnprocessableContent.Body) { + self.body = body + } + } + /// Unprocessable request entity error(s) + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/post(buildUploadFiles_createInstance)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Operations.BuildUploadFilesCreateInstance.Output.UnprocessableContent) + /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Operations.BuildUploadFilesCreateInstance.Output.UnprocessableContent { + get throws { + switch self { + case let .unprocessableContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unprocessableContent", + response: self + ) + } + } + } + public struct TooManyRequests: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/responses/429/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/POST/responses/429/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesCreateInstance.Output.TooManyRequests.Body + /// Creates a new `TooManyRequests`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesCreateInstance.Output.TooManyRequests.Body) { + self.body = body + } + } + /// Rate limit exceeded error + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/post(buildUploadFiles_createInstance)/responses/429`. + /// + /// HTTP response code: `429 tooManyRequests`. + case tooManyRequests(Operations.BuildUploadFilesCreateInstance.Output.TooManyRequests) + /// The associated value of the enum case if `self` is `.tooManyRequests`. + /// + /// - Throws: An error if `self` is not `.tooManyRequests`. + /// - SeeAlso: `.tooManyRequests`. + public var tooManyRequests: Operations.BuildUploadFilesCreateInstance.Output.TooManyRequests { + get throws { + switch self { + case let .tooManyRequests(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "tooManyRequests", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// - Remark: HTTP `GET /v1/buildUploadFiles/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/get(buildUploadFiles_getInstance)`. + public enum BuildUploadFilesGetInstance { + public static let id: Swift.String = "buildUploadFiles_getInstance" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/path`. + public struct Path: Sendable, Hashable { + /// the id of the requested resource + /// + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: the id of the requested resource + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.BuildUploadFilesGetInstance.Input.Path + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/query/Fields_lbrack_buildUploadFiles_rbrack_Payload`. + @frozen public enum FieldsLbrackBuildUploadFilesRbrackPayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { + case assetDeliveryState = "assetDeliveryState" + case assetToken = "assetToken" + case assetType = "assetType" + case fileName = "fileName" + case fileSize = "fileSize" + case sourceFileChecksums = "sourceFileChecksums" + case uploadOperations = "uploadOperations" + case uti = "uti" + } + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/query/fields[buildUploadFiles]`. + public typealias Fields_lbrack_buildUploadFiles_rbrack_Payload = [Operations.BuildUploadFilesGetInstance.Input.Query.FieldsLbrackBuildUploadFilesRbrackPayloadPayload] + /// the fields to include for returned resources of type buildUploadFiles + /// + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/query/fields[buildUploadFiles]`. + public var fields_lbrack_buildUploadFiles_rbrack_: Operations.BuildUploadFilesGetInstance.Input.Query.Fields_lbrack_buildUploadFiles_rbrack_Payload? + /// Creates a new `Query`. + /// + /// - Parameters: + /// - fields_lbrack_buildUploadFiles_rbrack_: the fields to include for returned resources of type buildUploadFiles + public init(fields_lbrack_buildUploadFiles_rbrack_: Operations.BuildUploadFilesGetInstance.Input.Query.Fields_lbrack_buildUploadFiles_rbrack_Payload? = nil) { + self.fields_lbrack_buildUploadFiles_rbrack_ = fields_lbrack_buildUploadFiles_rbrack_ + } + } + public var query: Operations.BuildUploadFilesGetInstance.Input.Query + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.BuildUploadFilesGetInstance.Input.Headers + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - query: + /// - headers: + public init( + path: Operations.BuildUploadFilesGetInstance.Input.Path, + query: Operations.BuildUploadFilesGetInstance.Input.Query = .init(), + headers: Operations.BuildUploadFilesGetInstance.Input.Headers = .init() + ) { + self.path = path + self.query = query + self.headers = headers + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.BuildUploadFileResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.BuildUploadFileResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesGetInstance.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesGetInstance.Output.Ok.Body) { + self.body = body + } + } + /// Single BuildUploadFile + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/get(buildUploadFiles_getInstance)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.BuildUploadFilesGetInstance.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.BuildUploadFilesGetInstance.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/responses/400/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesGetInstance.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesGetInstance.Output.BadRequest.Body) { + self.body = body + } + } + /// Parameter error(s) + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/get(buildUploadFiles_getInstance)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.BuildUploadFilesGetInstance.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.BuildUploadFilesGetInstance.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/responses/401/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesGetInstance.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesGetInstance.Output.Unauthorized.Body) { + self.body = body + } + } + /// Unauthorized error(s) + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/get(buildUploadFiles_getInstance)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.BuildUploadFilesGetInstance.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.BuildUploadFilesGetInstance.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct Forbidden: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/responses/403/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/responses/403/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesGetInstance.Output.Forbidden.Body + /// Creates a new `Forbidden`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesGetInstance.Output.Forbidden.Body) { + self.body = body + } + } + /// Forbidden error + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/get(buildUploadFiles_getInstance)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Operations.BuildUploadFilesGetInstance.Output.Forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Operations.BuildUploadFilesGetInstance.Output.Forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/responses/404/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesGetInstance.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesGetInstance.Output.NotFound.Body) { + self.body = body + } + } + /// Not found error + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/get(buildUploadFiles_getInstance)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.BuildUploadFilesGetInstance.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.BuildUploadFilesGetInstance.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct TooManyRequests: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/responses/429/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/GET/responses/429/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesGetInstance.Output.TooManyRequests.Body + /// Creates a new `TooManyRequests`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesGetInstance.Output.TooManyRequests.Body) { + self.body = body + } + } + /// Rate limit exceeded error + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/get(buildUploadFiles_getInstance)/responses/429`. + /// + /// HTTP response code: `429 tooManyRequests`. + case tooManyRequests(Operations.BuildUploadFilesGetInstance.Output.TooManyRequests) + /// The associated value of the enum case if `self` is `.tooManyRequests`. + /// + /// - Throws: An error if `self` is not `.tooManyRequests`. + /// - SeeAlso: `.tooManyRequests`. + public var tooManyRequests: Operations.BuildUploadFilesGetInstance.Output.TooManyRequests { + get throws { + switch self { + case let .tooManyRequests(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "tooManyRequests", + response: self + ) + } + } + } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// - Remark: HTTP `PATCH /v1/buildUploadFiles/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/patch(buildUploadFiles_updateInstance)`. + public enum BuildUploadFilesUpdateInstance { + public static let id: Swift.String = "buildUploadFiles_updateInstance" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/path`. + public struct Path: Sendable, Hashable { + /// the id of the requested resource + /// + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/path/id`. + public var id: Swift.String + /// Creates a new `Path`. + /// + /// - Parameters: + /// - id: the id of the requested resource + public init(id: Swift.String) { + self.id = id + } + } + public var path: Operations.BuildUploadFilesUpdateInstance.Input.Path + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.BuildUploadFilesUpdateInstance.Input.Headers + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/requestBody/content/application\/json`. + case json(Components.Schemas.BuildUploadFileUpdateRequest) + } + public var body: Operations.BuildUploadFilesUpdateInstance.Input.Body + /// Creates a new `Input`. + /// + /// - Parameters: + /// - path: + /// - headers: + /// - body: + public init( + path: Operations.BuildUploadFilesUpdateInstance.Input.Path, + headers: Operations.BuildUploadFilesUpdateInstance.Input.Headers = .init(), + body: Operations.BuildUploadFilesUpdateInstance.Input.Body + ) { + self.path = path + self.headers = headers + self.body = body + } + } + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/200/content/application\/json`. + case json(Components.Schemas.BuildUploadFileResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.BuildUploadFileResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesUpdateInstance.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesUpdateInstance.Output.Ok.Body) { + self.body = body + } + } + /// Single BuildUploadFile + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/patch(buildUploadFiles_updateInstance)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.BuildUploadFilesUpdateInstance.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.BuildUploadFilesUpdateInstance.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/400/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesUpdateInstance.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesUpdateInstance.Output.BadRequest.Body) { + self.body = body + } + } + /// Parameter error(s) + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/patch(buildUploadFiles_updateInstance)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.BuildUploadFilesUpdateInstance.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.BuildUploadFilesUpdateInstance.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/401/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesUpdateInstance.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesUpdateInstance.Output.Unauthorized.Body) { + self.body = body + } + } + /// Unauthorized error(s) + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/patch(buildUploadFiles_updateInstance)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.BuildUploadFilesUpdateInstance.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.BuildUploadFilesUpdateInstance.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } + } + public struct Forbidden: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/403/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/403/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesUpdateInstance.Output.Forbidden.Body + /// Creates a new `Forbidden`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesUpdateInstance.Output.Forbidden.Body) { + self.body = body + } + } + /// Forbidden error + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/patch(buildUploadFiles_updateInstance)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Operations.BuildUploadFilesUpdateInstance.Output.Forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Operations.BuildUploadFilesUpdateInstance.Output.Forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } + } + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/404/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesUpdateInstance.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesUpdateInstance.Output.NotFound.Body) { + self.body = body + } + } + /// Not found error + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/patch(buildUploadFiles_updateInstance)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.BuildUploadFilesUpdateInstance.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.BuildUploadFilesUpdateInstance.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/409/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesUpdateInstance.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesUpdateInstance.Output.Conflict.Body) { + self.body = body + } + } + /// Request entity error(s) + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/patch(buildUploadFiles_updateInstance)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.BuildUploadFilesUpdateInstance.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.BuildUploadFilesUpdateInstance.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } + } + public struct UnprocessableContent: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/422/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/422/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadFilesUpdateInstance.Output.UnprocessableContent.Body + /// Creates a new `UnprocessableContent`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesUpdateInstance.Output.UnprocessableContent.Body) { + self.body = body + } + } + /// Unprocessable request entity error(s) + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/patch(buildUploadFiles_updateInstance)/responses/422`. + /// + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Operations.BuildUploadFilesUpdateInstance.Output.UnprocessableContent) + /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Operations.BuildUploadFilesUpdateInstance.Output.UnprocessableContent { + get throws { + switch self { + case let .unprocessableContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unprocessableContent", + response: self + ) + } + } + } + public struct TooManyRequests: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/429/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploadFiles/{id}/PATCH/responses/429/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. /// - /// - Parameters: - /// - bundleId: - /// - devices: - /// - certificates: - public init( - bundleId: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.BundleIdPayload, - devices: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.DevicesPayload? = nil, - certificates: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload.CertificatesPayload - ) { - self.bundleId = bundleId - self.devices = devices - self.certificates = certificates - } - public enum CodingKeys: String, CodingKey { - case bundleId - case devices - case certificates + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } } } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data/relationships`. - public var relationships: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload - /// Creates a new `DataPayload`. + /// Received HTTP response body + public var body: Operations.BuildUploadFilesUpdateInstance.Output.TooManyRequests.Body + /// Creates a new `TooManyRequests`. /// /// - Parameters: - /// - _type: - /// - attributes: - /// - relationships: - public init( - _type: Components.Schemas.ProfileCreateRequest.DataPayload._TypePayload, - attributes: Components.Schemas.ProfileCreateRequest.DataPayload.AttributesPayload, - relationships: Components.Schemas.ProfileCreateRequest.DataPayload.RelationshipsPayload - ) { - self._type = _type - self.attributes = attributes - self.relationships = relationships + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadFilesUpdateInstance.Output.TooManyRequests.Body) { + self.body = body } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case attributes - case relationships + } + /// Rate limit exceeded error + /// + /// - Remark: Generated from `#/paths//v1/buildUploadFiles/{id}/patch(buildUploadFiles_updateInstance)/responses/429`. + /// + /// HTTP response code: `429 tooManyRequests`. + case tooManyRequests(Operations.BuildUploadFilesUpdateInstance.Output.TooManyRequests) + /// The associated value of the enum case if `self` is `.tooManyRequests`. + /// + /// - Throws: An error if `self` is not `.tooManyRequests`. + /// - SeeAlso: `.tooManyRequests`. + public var tooManyRequests: Operations.BuildUploadFilesUpdateInstance.Output.TooManyRequests { + get throws { + switch self { + case let .tooManyRequests(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "tooManyRequests", + response: self + ) + } } } - /// - Remark: Generated from `#/components/schemas/ProfileCreateRequest/data`. - public var data: Components.Schemas.ProfileCreateRequest.DataPayload - /// Creates a new `ProfileCreateRequest`. + /// Undocumented response. /// - /// - Parameters: - /// - data: - public init(data: Components.Schemas.ProfileCreateRequest.DataPayload) { - self.data = data + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) + } } - public enum CodingKeys: String, CodingKey { - case data + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] } } - /// - Remark: Generated from `#/components/schemas/AppWithoutIncludesResponse`. - public struct AppWithoutIncludesResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/AppWithoutIncludesResponse/data`. - public var data: Components.Schemas.App - /// - Remark: Generated from `#/components/schemas/AppWithoutIncludesResponse/links`. - public var links: Components.Schemas.DocumentLinks - /// Creates a new `AppWithoutIncludesResponse`. + } + /// - Remark: HTTP `POST /v1/buildUploads`. + /// - Remark: Generated from `#/paths//v1/buildUploads/post(buildUploads_createInstance)`. + public enum BuildUploadsCreateInstance { + public static let id: Swift.String = "buildUploads_createInstance" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept + } + } + public var headers: Operations.BuildUploadsCreateInstance.Input.Headers + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/requestBody`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/requestBody/content/application\/json`. + case json(Components.Schemas.BuildUploadCreateRequest) + } + public var body: Operations.BuildUploadsCreateInstance.Input.Body + /// Creates a new `Input`. /// /// - Parameters: - /// - data: - /// - links: + /// - headers: + /// - body: public init( - data: Components.Schemas.App, - links: Components.Schemas.DocumentLinks + headers: Operations.BuildUploadsCreateInstance.Input.Headers = .init(), + body: Operations.BuildUploadsCreateInstance.Input.Body ) { - self.data = data - self.links = links - } - public enum CodingKeys: String, CodingKey { - case data - case links + self.headers = headers + self.body = body } } - /// - Remark: Generated from `#/components/schemas/BundleIdAppLinkageResponse`. - public struct BundleIdAppLinkageResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdAppLinkageResponse/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdAppLinkageResponse/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case apps = "apps" + @frozen public enum Output: Sendable, Hashable { + public struct Created: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/responses/201/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/responses/201/content/application\/json`. + case json(Components.Schemas.BuildUploadResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.BuildUploadResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadsCreateInstance.Output.Created.Body + /// Creates a new `Created`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsCreateInstance.Output.Created.Body) { + self.body = body + } + } + /// Single BuildUpload + /// + /// - Remark: Generated from `#/paths//v1/buildUploads/post(buildUploads_createInstance)/responses/201`. + /// + /// HTTP response code: `201 created`. + case created(Operations.BuildUploadsCreateInstance.Output.Created) + /// The associated value of the enum case if `self` is `.created`. + /// + /// - Throws: An error if `self` is not `.created`. + /// - SeeAlso: `.created`. + public var created: Operations.BuildUploadsCreateInstance.Output.Created { + get throws { + switch self { + case let .created(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "created", + response: self + ) + } + } + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/responses/400/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadsCreateInstance.Output.BadRequest.Body + /// Creates a new `BadRequest`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsCreateInstance.Output.BadRequest.Body) { + self.body = body + } + } + /// Parameter error(s) + /// + /// - Remark: Generated from `#/paths//v1/buildUploads/post(buildUploads_createInstance)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.BuildUploadsCreateInstance.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.BuildUploadsCreateInstance.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) + } + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/responses/401/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } } - /// - Remark: Generated from `#/components/schemas/BundleIdAppLinkageResponse/data/type`. - public var _type: Components.Schemas.BundleIdAppLinkageResponse.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/BundleIdAppLinkageResponse/data/id`. - public var id: Swift.String - /// Creates a new `DataPayload`. + /// Received HTTP response body + public var body: Operations.BuildUploadsCreateInstance.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. /// /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.BundleIdAppLinkageResponse.DataPayload._TypePayload, - id: Swift.String - ) { - self._type = _type - self.id = id - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsCreateInstance.Output.Unauthorized.Body) { + self.body = body } } - /// - Remark: Generated from `#/components/schemas/BundleIdAppLinkageResponse/data`. - public var data: Components.Schemas.BundleIdAppLinkageResponse.DataPayload - /// - Remark: Generated from `#/components/schemas/BundleIdAppLinkageResponse/links`. - public var links: Components.Schemas.DocumentLinks - /// Creates a new `BundleIdAppLinkageResponse`. + /// Unauthorized error(s) /// - /// - Parameters: - /// - data: - /// - links: - public init( - data: Components.Schemas.BundleIdAppLinkageResponse.DataPayload, - links: Components.Schemas.DocumentLinks - ) { - self.data = data - self.links = links - } - public enum CodingKeys: String, CodingKey { - case data - case links - } - } - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilitiesWithoutIncludesResponse`. - public struct BundleIdCapabilitiesWithoutIncludesResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilitiesWithoutIncludesResponse/data`. - public var data: [Components.Schemas.BundleIdCapability] - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilitiesWithoutIncludesResponse/links`. - public var links: Components.Schemas.PagedDocumentLinks - /// - Remark: Generated from `#/components/schemas/BundleIdCapabilitiesWithoutIncludesResponse/meta`. - public var meta: Components.Schemas.PagingInformation? - /// Creates a new `BundleIdCapabilitiesWithoutIncludesResponse`. + /// - Remark: Generated from `#/paths//v1/buildUploads/post(buildUploads_createInstance)/responses/401`. /// - /// - Parameters: - /// - data: - /// - links: - /// - meta: - public init( - data: [Components.Schemas.BundleIdCapability], - links: Components.Schemas.PagedDocumentLinks, - meta: Components.Schemas.PagingInformation? = nil - ) { - self.data = data - self.links = links - self.meta = meta - } - public enum CodingKeys: String, CodingKey { - case data - case links - case meta + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.BuildUploadsCreateInstance.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.BuildUploadsCreateInstance.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } } - } - /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse`. - public struct BundleIdBundleIdCapabilitiesLinkagesResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/DataPayload`. - public struct DataPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/DataPayload/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case bundleIdCapabilities = "bundleIdCapabilities" + public struct Forbidden: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/responses/403/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/responses/403/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } } - /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/DataPayload/type`. - public var _type: Components.Schemas.BundleIdBundleIdCapabilitiesLinkagesResponse.DataPayloadPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/DataPayload/id`. - public var id: Swift.String - /// Creates a new `DataPayloadPayload`. + /// Received HTTP response body + public var body: Operations.BuildUploadsCreateInstance.Output.Forbidden.Body + /// Creates a new `Forbidden`. /// /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.BundleIdBundleIdCapabilitiesLinkagesResponse.DataPayloadPayload._TypePayload, - id: Swift.String - ) { - self._type = _type - self.id = id - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsCreateInstance.Output.Forbidden.Body) { + self.body = body } } - /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/data`. - public typealias DataPayload = [Components.Schemas.BundleIdBundleIdCapabilitiesLinkagesResponse.DataPayloadPayload] - /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/data`. - public var data: Components.Schemas.BundleIdBundleIdCapabilitiesLinkagesResponse.DataPayload - /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/links`. - public var links: Components.Schemas.PagedDocumentLinks - /// - Remark: Generated from `#/components/schemas/BundleIdBundleIdCapabilitiesLinkagesResponse/meta`. - public var meta: Components.Schemas.PagingInformation? - /// Creates a new `BundleIdBundleIdCapabilitiesLinkagesResponse`. + /// Forbidden error /// - /// - Parameters: - /// - data: - /// - links: - /// - meta: - public init( - data: Components.Schemas.BundleIdBundleIdCapabilitiesLinkagesResponse.DataPayload, - links: Components.Schemas.PagedDocumentLinks, - meta: Components.Schemas.PagingInformation? = nil - ) { - self.data = data - self.links = links - self.meta = meta - } - public enum CodingKeys: String, CodingKey { - case data - case links - case meta - } - } - /// - Remark: Generated from `#/components/schemas/ProfilesWithoutIncludesResponse`. - public struct ProfilesWithoutIncludesResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfilesWithoutIncludesResponse/data`. - public var data: [Components.Schemas.Profile] - /// - Remark: Generated from `#/components/schemas/ProfilesWithoutIncludesResponse/links`. - public var links: Components.Schemas.PagedDocumentLinks - /// - Remark: Generated from `#/components/schemas/ProfilesWithoutIncludesResponse/meta`. - public var meta: Components.Schemas.PagingInformation? - /// Creates a new `ProfilesWithoutIncludesResponse`. + /// - Remark: Generated from `#/paths//v1/buildUploads/post(buildUploads_createInstance)/responses/403`. /// - /// - Parameters: - /// - data: - /// - links: - /// - meta: - public init( - data: [Components.Schemas.Profile], - links: Components.Schemas.PagedDocumentLinks, - meta: Components.Schemas.PagingInformation? = nil - ) { - self.data = data - self.links = links - self.meta = meta - } - public enum CodingKeys: String, CodingKey { - case data - case links - case meta - } - } - /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse`. - public struct BundleIdProfilesLinkagesResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/DataPayload`. - public struct DataPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/DataPayload/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case profiles = "profiles" + /// HTTP response code: `403 forbidden`. + case forbidden(Operations.BuildUploadsCreateInstance.Output.Forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Operations.BuildUploadsCreateInstance.Output.Forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } } - /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/DataPayload/type`. - public var _type: Components.Schemas.BundleIdProfilesLinkagesResponse.DataPayloadPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/DataPayload/id`. - public var id: Swift.String - /// Creates a new `DataPayloadPayload`. - /// - /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.BundleIdProfilesLinkagesResponse.DataPayloadPayload._TypePayload, - id: Swift.String - ) { - self._type = _type - self.id = id + } + public struct Conflict: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/responses/409/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/responses/409/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id + /// Received HTTP response body + public var body: Operations.BuildUploadsCreateInstance.Output.Conflict.Body + /// Creates a new `Conflict`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsCreateInstance.Output.Conflict.Body) { + self.body = body } } - /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/data`. - public typealias DataPayload = [Components.Schemas.BundleIdProfilesLinkagesResponse.DataPayloadPayload] - /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/data`. - public var data: Components.Schemas.BundleIdProfilesLinkagesResponse.DataPayload - /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/links`. - public var links: Components.Schemas.PagedDocumentLinks - /// - Remark: Generated from `#/components/schemas/BundleIdProfilesLinkagesResponse/meta`. - public var meta: Components.Schemas.PagingInformation? - /// Creates a new `BundleIdProfilesLinkagesResponse`. + /// Request entity error(s) /// - /// - Parameters: - /// - data: - /// - links: - /// - meta: - public init( - data: Components.Schemas.BundleIdProfilesLinkagesResponse.DataPayload, - links: Components.Schemas.PagedDocumentLinks, - meta: Components.Schemas.PagingInformation? = nil - ) { - self.data = data - self.links = links - self.meta = meta - } - public enum CodingKeys: String, CodingKey { - case data - case links - case meta + /// - Remark: Generated from `#/paths//v1/buildUploads/post(buildUploads_createInstance)/responses/409`. + /// + /// HTTP response code: `409 conflict`. + case conflict(Operations.BuildUploadsCreateInstance.Output.Conflict) + /// The associated value of the enum case if `self` is `.conflict`. + /// + /// - Throws: An error if `self` is not `.conflict`. + /// - SeeAlso: `.conflict`. + public var conflict: Operations.BuildUploadsCreateInstance.Output.Conflict { + get throws { + switch self { + case let .conflict(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "conflict", + response: self + ) + } + } } - } - /// - Remark: Generated from `#/components/schemas/CertificatePassTypeIdLinkageResponse`. - public struct CertificatePassTypeIdLinkageResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificatePassTypeIdLinkageResponse/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificatePassTypeIdLinkageResponse/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case passTypeIds = "passTypeIds" + public struct UnprocessableContent: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/responses/422/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/responses/422/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } } - /// - Remark: Generated from `#/components/schemas/CertificatePassTypeIdLinkageResponse/data/type`. - public var _type: Components.Schemas.CertificatePassTypeIdLinkageResponse.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/CertificatePassTypeIdLinkageResponse/data/id`. - public var id: Swift.String - /// Creates a new `DataPayload`. + /// Received HTTP response body + public var body: Operations.BuildUploadsCreateInstance.Output.UnprocessableContent.Body + /// Creates a new `UnprocessableContent`. /// /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.CertificatePassTypeIdLinkageResponse.DataPayload._TypePayload, - id: Swift.String - ) { - self._type = _type - self.id = id - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsCreateInstance.Output.UnprocessableContent.Body) { + self.body = body } } - /// - Remark: Generated from `#/components/schemas/CertificatePassTypeIdLinkageResponse/data`. - public var data: Components.Schemas.CertificatePassTypeIdLinkageResponse.DataPayload - /// - Remark: Generated from `#/components/schemas/CertificatePassTypeIdLinkageResponse/links`. - public var links: Components.Schemas.DocumentLinks - /// Creates a new `CertificatePassTypeIdLinkageResponse`. + /// Unprocessable request entity error(s) /// - /// - Parameters: - /// - data: - /// - links: - public init( - data: Components.Schemas.CertificatePassTypeIdLinkageResponse.DataPayload, - links: Components.Schemas.DocumentLinks - ) { - self.data = data - self.links = links - } - public enum CodingKeys: String, CodingKey { - case data - case links - } - } - /// - Remark: Generated from `#/components/schemas/BundleIdWithoutIncludesResponse`. - public struct BundleIdWithoutIncludesResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdWithoutIncludesResponse/data`. - public var data: Components.Schemas.BundleId - /// - Remark: Generated from `#/components/schemas/BundleIdWithoutIncludesResponse/links`. - public var links: Components.Schemas.DocumentLinks - /// Creates a new `BundleIdWithoutIncludesResponse`. + /// - Remark: Generated from `#/paths//v1/buildUploads/post(buildUploads_createInstance)/responses/422`. /// - /// - Parameters: - /// - data: - /// - links: - public init( - data: Components.Schemas.BundleId, - links: Components.Schemas.DocumentLinks - ) { - self.data = data - self.links = links - } - public enum CodingKeys: String, CodingKey { - case data - case links + /// HTTP response code: `422 unprocessableContent`. + case unprocessableContent(Operations.BuildUploadsCreateInstance.Output.UnprocessableContent) + /// The associated value of the enum case if `self` is `.unprocessableContent`. + /// + /// - Throws: An error if `self` is not `.unprocessableContent`. + /// - SeeAlso: `.unprocessableContent`. + public var unprocessableContent: Operations.BuildUploadsCreateInstance.Output.UnprocessableContent { + get throws { + switch self { + case let .unprocessableContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unprocessableContent", + response: self + ) + } + } } - } - /// - Remark: Generated from `#/components/schemas/ProfileBundleIdLinkageResponse`. - public struct ProfileBundleIdLinkageResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileBundleIdLinkageResponse/data`. - public struct DataPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileBundleIdLinkageResponse/data/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case bundleIds = "bundleIds" + public struct TooManyRequests: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/responses/429/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/POST/responses/429/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } } - /// - Remark: Generated from `#/components/schemas/ProfileBundleIdLinkageResponse/data/type`. - public var _type: Components.Schemas.ProfileBundleIdLinkageResponse.DataPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/ProfileBundleIdLinkageResponse/data/id`. - public var id: Swift.String - /// Creates a new `DataPayload`. + /// Received HTTP response body + public var body: Operations.BuildUploadsCreateInstance.Output.TooManyRequests.Body + /// Creates a new `TooManyRequests`. /// /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.ProfileBundleIdLinkageResponse.DataPayload._TypePayload, - id: Swift.String - ) { - self._type = _type - self.id = id - } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsCreateInstance.Output.TooManyRequests.Body) { + self.body = body } } - /// - Remark: Generated from `#/components/schemas/ProfileBundleIdLinkageResponse/data`. - public var data: Components.Schemas.ProfileBundleIdLinkageResponse.DataPayload - /// - Remark: Generated from `#/components/schemas/ProfileBundleIdLinkageResponse/links`. - public var links: Components.Schemas.DocumentLinks - /// Creates a new `ProfileBundleIdLinkageResponse`. + /// Rate limit exceeded error /// - /// - Parameters: - /// - data: - /// - links: - public init( - data: Components.Schemas.ProfileBundleIdLinkageResponse.DataPayload, - links: Components.Schemas.DocumentLinks - ) { - self.data = data - self.links = links - } - public enum CodingKeys: String, CodingKey { - case data - case links - } - } - /// - Remark: Generated from `#/components/schemas/CertificatesWithoutIncludesResponse`. - public struct CertificatesWithoutIncludesResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificatesWithoutIncludesResponse/data`. - public var data: [Components.Schemas.Certificate] - /// - Remark: Generated from `#/components/schemas/CertificatesWithoutIncludesResponse/links`. - public var links: Components.Schemas.PagedDocumentLinks - /// - Remark: Generated from `#/components/schemas/CertificatesWithoutIncludesResponse/meta`. - public var meta: Components.Schemas.PagingInformation? - /// Creates a new `CertificatesWithoutIncludesResponse`. + /// - Remark: Generated from `#/paths//v1/buildUploads/post(buildUploads_createInstance)/responses/429`. /// - /// - Parameters: - /// - data: - /// - links: - /// - meta: - public init( - data: [Components.Schemas.Certificate], - links: Components.Schemas.PagedDocumentLinks, - meta: Components.Schemas.PagingInformation? = nil - ) { - self.data = data - self.links = links - self.meta = meta - } - public enum CodingKeys: String, CodingKey { - case data - case links - case meta + /// HTTP response code: `429 tooManyRequests`. + case tooManyRequests(Operations.BuildUploadsCreateInstance.Output.TooManyRequests) + /// The associated value of the enum case if `self` is `.tooManyRequests`. + /// + /// - Throws: An error if `self` is not `.tooManyRequests`. + /// - SeeAlso: `.tooManyRequests`. + public var tooManyRequests: Operations.BuildUploadsCreateInstance.Output.TooManyRequests { + get throws { + switch self { + case let .tooManyRequests(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "tooManyRequests", + response: self + ) + } + } } + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) } - /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse`. - public struct ProfileCertificatesLinkagesResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/DataPayload`. - public struct DataPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/DataPayload/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case certificates = "certificates" + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) } - /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/DataPayload/type`. - public var _type: Components.Schemas.ProfileCertificatesLinkagesResponse.DataPayloadPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/DataPayload/id`. + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" + } + } + public static var allCases: [Self] { + [ + .json + ] + } + } + } + /// - Remark: HTTP `GET /v1/buildUploads/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/get(buildUploads_getInstance)`. + public enum BuildUploadsGetInstance { + public static let id: Swift.String = "buildUploads_getInstance" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/path`. + public struct Path: Sendable, Hashable { + /// the id of the requested resource + /// + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/path/id`. public var id: Swift.String - /// Creates a new `DataPayloadPayload`. + /// Creates a new `Path`. /// /// - Parameters: - /// - _type: - /// - id: - public init( - _type: Components.Schemas.ProfileCertificatesLinkagesResponse.DataPayloadPayload._TypePayload, - id: Swift.String - ) { - self._type = _type + /// - id: the id of the requested resource + public init(id: Swift.String) { self.id = id } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id - } - } - /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/data`. - public typealias DataPayload = [Components.Schemas.ProfileCertificatesLinkagesResponse.DataPayloadPayload] - /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/data`. - public var data: Components.Schemas.ProfileCertificatesLinkagesResponse.DataPayload - /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/links`. - public var links: Components.Schemas.PagedDocumentLinks - /// - Remark: Generated from `#/components/schemas/ProfileCertificatesLinkagesResponse/meta`. - public var meta: Components.Schemas.PagingInformation? - /// Creates a new `ProfileCertificatesLinkagesResponse`. - /// - /// - Parameters: - /// - data: - /// - links: - /// - meta: - public init( - data: Components.Schemas.ProfileCertificatesLinkagesResponse.DataPayload, - links: Components.Schemas.PagedDocumentLinks, - meta: Components.Schemas.PagingInformation? = nil - ) { - self.data = data - self.links = links - self.meta = meta - } - public enum CodingKeys: String, CodingKey { - case data - case links - case meta - } - } - /// - Remark: Generated from `#/components/schemas/DevicesWithoutIncludesResponse`. - public struct DevicesWithoutIncludesResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/DevicesWithoutIncludesResponse/data`. - public var data: [Components.Schemas.Device] - /// - Remark: Generated from `#/components/schemas/DevicesWithoutIncludesResponse/links`. - public var links: Components.Schemas.PagedDocumentLinks - /// - Remark: Generated from `#/components/schemas/DevicesWithoutIncludesResponse/meta`. - public var meta: Components.Schemas.PagingInformation? - /// Creates a new `DevicesWithoutIncludesResponse`. - /// - /// - Parameters: - /// - data: - /// - links: - /// - meta: - public init( - data: [Components.Schemas.Device], - links: Components.Schemas.PagedDocumentLinks, - meta: Components.Schemas.PagingInformation? = nil - ) { - self.data = data - self.links = links - self.meta = meta } - public enum CodingKeys: String, CodingKey { - case data - case links - case meta - } - } - /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse`. - public struct ProfileDevicesLinkagesResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/DataPayload`. - public struct DataPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/DataPayload/type`. - @frozen public enum _TypePayload: String, Codable, Hashable, Sendable, CaseIterable { - case devices = "devices" + public var path: Operations.BuildUploadsGetInstance.Input.Path + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/query`. + public struct Query: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/query/Fields_lbrack_buildUploads_rbrack_Payload`. + @frozen public enum FieldsLbrackBuildUploadsRbrackPayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { + case cfBundleShortVersionString = "cfBundleShortVersionString" + case cfBundleVersion = "cfBundleVersion" + case createdDate = "createdDate" + case state = "state" + case platform = "platform" + case uploadedDate = "uploadedDate" + case build = "build" + case assetFile = "assetFile" + case assetDescriptionFile = "assetDescriptionFile" + case assetSpiFile = "assetSpiFile" + case buildUploadFiles = "buildUploadFiles" + } + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/query/fields[buildUploads]`. + public typealias Fields_lbrack_buildUploads_rbrack_Payload = [Operations.BuildUploadsGetInstance.Input.Query.FieldsLbrackBuildUploadsRbrackPayloadPayload] + /// the fields to include for returned resources of type buildUploads + /// + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/query/fields[buildUploads]`. + public var fields_lbrack_buildUploads_rbrack_: Operations.BuildUploadsGetInstance.Input.Query.Fields_lbrack_buildUploads_rbrack_Payload? + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/query/Fields_lbrack_builds_rbrack_Payload`. + @frozen public enum FieldsLbrackBuildsRbrackPayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { + case version = "version" + case uploadedDate = "uploadedDate" + case expirationDate = "expirationDate" + case expired = "expired" + case minOsVersion = "minOsVersion" + case lsMinimumSystemVersion = "lsMinimumSystemVersion" + case computedMinMacOsVersion = "computedMinMacOsVersion" + case computedMinVisionOsVersion = "computedMinVisionOsVersion" + case iconAssetToken = "iconAssetToken" + case processingState = "processingState" + case buildAudienceType = "buildAudienceType" + case usesNonExemptEncryption = "usesNonExemptEncryption" + case preReleaseVersion = "preReleaseVersion" + case individualTesters = "individualTesters" + case betaGroups = "betaGroups" + case betaBuildLocalizations = "betaBuildLocalizations" + case appEncryptionDeclaration = "appEncryptionDeclaration" + case betaAppReviewSubmission = "betaAppReviewSubmission" + case app = "app" + case buildBetaDetail = "buildBetaDetail" + case appStoreVersion = "appStoreVersion" + case icons = "icons" + case buildBundles = "buildBundles" + case buildUpload = "buildUpload" + case perfPowerMetrics = "perfPowerMetrics" + case diagnosticSignatures = "diagnosticSignatures" + } + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/query/fields[builds]`. + public typealias Fields_lbrack_builds_rbrack_Payload = [Operations.BuildUploadsGetInstance.Input.Query.FieldsLbrackBuildsRbrackPayloadPayload] + /// the fields to include for returned resources of type builds + /// + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/query/fields[builds]`. + public var fields_lbrack_builds_rbrack_: Operations.BuildUploadsGetInstance.Input.Query.Fields_lbrack_builds_rbrack_Payload? + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/query/Fields_lbrack_buildUploadFiles_rbrack_Payload`. + @frozen public enum FieldsLbrackBuildUploadFilesRbrackPayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { + case assetDeliveryState = "assetDeliveryState" + case assetToken = "assetToken" + case assetType = "assetType" + case fileName = "fileName" + case fileSize = "fileSize" + case sourceFileChecksums = "sourceFileChecksums" + case uploadOperations = "uploadOperations" + case uti = "uti" + } + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/query/fields[buildUploadFiles]`. + public typealias Fields_lbrack_buildUploadFiles_rbrack_Payload = [Operations.BuildUploadsGetInstance.Input.Query.FieldsLbrackBuildUploadFilesRbrackPayloadPayload] + /// the fields to include for returned resources of type buildUploadFiles + /// + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/query/fields[buildUploadFiles]`. + public var fields_lbrack_buildUploadFiles_rbrack_: Operations.BuildUploadsGetInstance.Input.Query.Fields_lbrack_buildUploadFiles_rbrack_Payload? + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/query/IncludePayload`. + @frozen public enum IncludePayloadPayload: String, Codable, Hashable, Sendable, CaseIterable { + case build = "build" + case assetFile = "assetFile" + case assetDescriptionFile = "assetDescriptionFile" + case assetSpiFile = "assetSpiFile" } - /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/DataPayload/type`. - public var _type: Components.Schemas.ProfileDevicesLinkagesResponse.DataPayloadPayload._TypePayload - /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/DataPayload/id`. - public var id: Swift.String - /// Creates a new `DataPayloadPayload`. + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/query/include`. + public typealias IncludePayload = [Operations.BuildUploadsGetInstance.Input.Query.IncludePayloadPayload] + /// comma-separated list of relationships to include + /// + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/query/include`. + public var include: Operations.BuildUploadsGetInstance.Input.Query.IncludePayload? + /// Creates a new `Query`. /// /// - Parameters: - /// - _type: - /// - id: + /// - fields_lbrack_buildUploads_rbrack_: the fields to include for returned resources of type buildUploads + /// - fields_lbrack_builds_rbrack_: the fields to include for returned resources of type builds + /// - fields_lbrack_buildUploadFiles_rbrack_: the fields to include for returned resources of type buildUploadFiles + /// - include: comma-separated list of relationships to include public init( - _type: Components.Schemas.ProfileDevicesLinkagesResponse.DataPayloadPayload._TypePayload, - id: Swift.String + fields_lbrack_buildUploads_rbrack_: Operations.BuildUploadsGetInstance.Input.Query.Fields_lbrack_buildUploads_rbrack_Payload? = nil, + fields_lbrack_builds_rbrack_: Operations.BuildUploadsGetInstance.Input.Query.Fields_lbrack_builds_rbrack_Payload? = nil, + fields_lbrack_buildUploadFiles_rbrack_: Operations.BuildUploadsGetInstance.Input.Query.Fields_lbrack_buildUploadFiles_rbrack_Payload? = nil, + include: Operations.BuildUploadsGetInstance.Input.Query.IncludePayload? = nil ) { - self._type = _type - self.id = id + self.fields_lbrack_buildUploads_rbrack_ = fields_lbrack_buildUploads_rbrack_ + self.fields_lbrack_builds_rbrack_ = fields_lbrack_builds_rbrack_ + self.fields_lbrack_buildUploadFiles_rbrack_ = fields_lbrack_buildUploadFiles_rbrack_ + self.include = include } - public enum CodingKeys: String, CodingKey { - case _type = "type" - case id + } + public var query: Operations.BuildUploadsGetInstance.Input.Query + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept } } - /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/data`. - public typealias DataPayload = [Components.Schemas.ProfileDevicesLinkagesResponse.DataPayloadPayload] - /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/data`. - public var data: Components.Schemas.ProfileDevicesLinkagesResponse.DataPayload - /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/links`. - public var links: Components.Schemas.PagedDocumentLinks - /// - Remark: Generated from `#/components/schemas/ProfileDevicesLinkagesResponse/meta`. - public var meta: Components.Schemas.PagingInformation? - /// Creates a new `ProfileDevicesLinkagesResponse`. + public var headers: Operations.BuildUploadsGetInstance.Input.Headers + /// Creates a new `Input`. /// /// - Parameters: - /// - data: - /// - links: - /// - meta: + /// - path: + /// - query: + /// - headers: public init( - data: Components.Schemas.ProfileDevicesLinkagesResponse.DataPayload, - links: Components.Schemas.PagedDocumentLinks, - meta: Components.Schemas.PagingInformation? = nil + path: Operations.BuildUploadsGetInstance.Input.Path, + query: Operations.BuildUploadsGetInstance.Input.Query = .init(), + headers: Operations.BuildUploadsGetInstance.Input.Headers = .init() ) { - self.data = data - self.links = links - self.meta = meta - } - public enum CodingKeys: String, CodingKey { - case data - case links - case meta + self.path = path + self.query = query + self.headers = headers } } - /// - Remark: Generated from `#/components/schemas/ErrorResponse`. - public struct ErrorResponse: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload`. - public struct ErrorsPayloadPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/id`. - public var id: Swift.String? - /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/status`. - public var status: Swift.String - /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/code`. - public var code: Swift.String - /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/title`. - public var title: Swift.String - /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/detail`. - public var detail: Swift.String - /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/source`. - @frozen public enum SourcePayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/source/case1`. - case ErrorSourcePointer(Components.Schemas.ErrorSourcePointer) - /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/source/case2`. - case ErrorSourceParameter(Components.Schemas.ErrorSourceParameter) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .ErrorSourcePointer(try .init(from: decoder)) - return - } catch { - errors.append(error) - } - do { - self = .ErrorSourceParameter(try .init(from: decoder)) - return - } catch { - errors.append(error) + @frozen public enum Output: Sendable, Hashable { + public struct Ok: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/responses/200/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/responses/200/content/application\/json`. + case json(Components.Schemas.BuildUploadResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.BuildUploadResponse { + get throws { + switch self { + case let .json(body): + return body + } } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadsGetInstance.Output.Ok.Body + /// Creates a new `Ok`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsGetInstance.Output.Ok.Body) { + self.body = body + } + } + /// Single BuildUpload + /// + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/get(buildUploads_getInstance)/responses/200`. + /// + /// HTTP response code: `200 ok`. + case ok(Operations.BuildUploadsGetInstance.Output.Ok) + /// The associated value of the enum case if `self` is `.ok`. + /// + /// - Throws: An error if `self` is not `.ok`. + /// - SeeAlso: `.ok`. + public var ok: Operations.BuildUploadsGetInstance.Output.Ok { + get throws { + switch self { + case let .ok(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "ok", + response: self ) } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .ErrorSourcePointer(value): - try value.encode(to: encoder) - case let .ErrorSourceParameter(value): - try value.encode(to: encoder) - } - } } - /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/source`. - public var source: Components.Schemas.ErrorResponse.ErrorsPayloadPayload.SourcePayload? - /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/links`. - public var links: Components.Schemas.ErrorLinks? - /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/meta`. - public struct MetaPayload: Codable, Hashable, Sendable { - /// A container of undocumented properties. - public var additionalProperties: [String: OpenAPIRuntime.OpenAPIValueContainer] - /// Creates a new `MetaPayload`. + } + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/responses/400/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. /// - /// - Parameters: - /// - additionalProperties: A container of undocumented properties. - public init(additionalProperties: [String: OpenAPIRuntime.OpenAPIValueContainer] = .init()) { - self.additionalProperties = additionalProperties - } - public init(from decoder: any Decoder) throws { - additionalProperties = try decoder.decodeAdditionalProperties(knownKeys: []) - } - public func encode(to encoder: any Encoder) throws { - try encoder.encodeAdditionalProperties(additionalProperties) + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } } } - /// - Remark: Generated from `#/components/schemas/ErrorResponse/ErrorsPayload/meta`. - public var meta: Components.Schemas.ErrorResponse.ErrorsPayloadPayload.MetaPayload? - /// Creates a new `ErrorsPayloadPayload`. + /// Received HTTP response body + public var body: Operations.BuildUploadsGetInstance.Output.BadRequest.Body + /// Creates a new `BadRequest`. /// /// - Parameters: - /// - id: - /// - status: - /// - code: - /// - title: - /// - detail: - /// - source: - /// - links: - /// - meta: - public init( - id: Swift.String? = nil, - status: Swift.String, - code: Swift.String, - title: Swift.String, - detail: Swift.String, - source: Components.Schemas.ErrorResponse.ErrorsPayloadPayload.SourcePayload? = nil, - links: Components.Schemas.ErrorLinks? = nil, - meta: Components.Schemas.ErrorResponse.ErrorsPayloadPayload.MetaPayload? = nil - ) { - self.id = id - self.status = status - self.code = code - self.title = title - self.detail = detail - self.source = source - self.links = links - self.meta = meta - } - public enum CodingKeys: String, CodingKey { - case id - case status - case code - case title - case detail - case source - case links - case meta + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsGetInstance.Output.BadRequest.Body) { + self.body = body } } - /// - Remark: Generated from `#/components/schemas/ErrorResponse/errors`. - public typealias ErrorsPayload = [Components.Schemas.ErrorResponse.ErrorsPayloadPayload] - /// - Remark: Generated from `#/components/schemas/ErrorResponse/errors`. - public var errors: Components.Schemas.ErrorResponse.ErrorsPayload? - /// Creates a new `ErrorResponse`. + /// Parameter error(s) /// - /// - Parameters: - /// - errors: - public init(errors: Components.Schemas.ErrorResponse.ErrorsPayload? = nil) { - self.errors = errors - } - public enum CodingKeys: String, CodingKey { - case errors - } - } - /// - Remark: Generated from `#/components/schemas/ErrorSourceParameter`. - public struct ErrorSourceParameter: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ErrorSourceParameter/parameter`. - public var parameter: Swift.String - /// Creates a new `ErrorSourceParameter`. + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/get(buildUploads_getInstance)/responses/400`. /// - /// - Parameters: - /// - parameter: - public init(parameter: Swift.String) { - self.parameter = parameter - } - public enum CodingKeys: String, CodingKey { - case parameter - } - } - /// - Remark: Generated from `#/components/schemas/ErrorSourcePointer`. - public struct ErrorSourcePointer: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ErrorSourcePointer/pointer`. - public var pointer: Swift.String - /// Creates a new `ErrorSourcePointer`. + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.BuildUploadsGetInstance.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. /// - /// - Parameters: - /// - pointer: - public init(pointer: Swift.String) { - self.pointer = pointer - } - public enum CodingKeys: String, CodingKey { - case pointer - } - } - /// - Remark: Generated from `#/components/schemas/ErrorLinks`. - public struct ErrorLinks: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ErrorLinks/about`. - public var about: Swift.String? - /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated`. - @frozen public enum AssociatedPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated/case1`. - case case1(Swift.String) - /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated/case2`. - public struct Case2Payload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated/case2/href`. - public var href: Swift.String? - /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated/case2/meta`. - public struct MetaPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated/case2/meta/source`. - public var source: Swift.String? - /// Creates a new `MetaPayload`. - /// - /// - Parameters: - /// - source: - public init(source: Swift.String? = nil) { - self.source = source - } - public enum CodingKeys: String, CodingKey { - case source - } + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.BuildUploadsGetInstance.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) } - /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated/case2/meta`. - public var meta: Components.Schemas.ErrorLinks.AssociatedPayload.Case2Payload.MetaPayload? - /// Creates a new `Case2Payload`. + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/responses/401/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. /// - /// - Parameters: - /// - href: - /// - meta: - public init( - href: Swift.String? = nil, - meta: Components.Schemas.ErrorLinks.AssociatedPayload.Case2Payload.MetaPayload? = nil - ) { - self.href = href - self.meta = meta - } - public enum CodingKeys: String, CodingKey { - case href - case meta + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } } } - /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated/case2`. - case case2(Components.Schemas.ErrorLinks.AssociatedPayload.Case2Payload) - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self = .case1(try decoder.decodeFromSingleValueContainer()) - return - } catch { - errors.append(error) + /// Received HTTP response body + public var body: Operations.BuildUploadsGetInstance.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsGetInstance.Output.Unauthorized.Body) { + self.body = body + } + } + /// Unauthorized error(s) + /// + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/get(buildUploads_getInstance)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.BuildUploadsGetInstance.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.BuildUploadsGetInstance.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) } - do { - self = .case2(try .init(from: decoder)) - return - } catch { - errors.append(error) + } + } + public struct Forbidden: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/responses/403/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/responses/403/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } } - throw Swift.DecodingError.failedToDecodeOneOfSchema( - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) } - public func encode(to encoder: any Encoder) throws { - switch self { - case let .case1(value): - try encoder.encodeToSingleValueContainer(value) - case let .case2(value): - try value.encode(to: encoder) - } + /// Received HTTP response body + public var body: Operations.BuildUploadsGetInstance.Output.Forbidden.Body + /// Creates a new `Forbidden`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsGetInstance.Output.Forbidden.Body) { + self.body = body } } - /// - Remark: Generated from `#/components/schemas/ErrorLinks/associated`. - public var associated: Components.Schemas.ErrorLinks.AssociatedPayload? - /// Creates a new `ErrorLinks`. + /// Forbidden error /// - /// - Parameters: - /// - about: - /// - associated: - public init( - about: Swift.String? = nil, - associated: Components.Schemas.ErrorLinks.AssociatedPayload? = nil - ) { - self.about = about - self.associated = associated - } - public enum CodingKeys: String, CodingKey { - case about - case associated - } - } - /// - Remark: Generated from `#/components/schemas/PagedDocumentLinks`. - public struct PagedDocumentLinks: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/PagedDocumentLinks/self`. - public var _self: Swift.String - /// - Remark: Generated from `#/components/schemas/PagedDocumentLinks/first`. - public var first: Swift.String? - /// - Remark: Generated from `#/components/schemas/PagedDocumentLinks/next`. - public var next: Swift.String? - /// Creates a new `PagedDocumentLinks`. + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/get(buildUploads_getInstance)/responses/403`. /// - /// - Parameters: - /// - _self: - /// - first: - /// - next: - public init( - _self: Swift.String, - first: Swift.String? = nil, - next: Swift.String? = nil - ) { - self._self = _self - self.first = first - self.next = next - } - public enum CodingKeys: String, CodingKey { - case _self = "self" - case first - case next + /// HTTP response code: `403 forbidden`. + case forbidden(Operations.BuildUploadsGetInstance.Output.Forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Operations.BuildUploadsGetInstance.Output.Forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } } - } - /// - Remark: Generated from `#/components/schemas/PagingInformation`. - public struct PagingInformation: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/PagingInformation/paging`. - public struct PagingPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/PagingInformation/paging/total`. - public var total: Swift.Int? - /// - Remark: Generated from `#/components/schemas/PagingInformation/paging/limit`. - public var limit: Swift.Int - /// - Remark: Generated from `#/components/schemas/PagingInformation/paging/nextCursor`. - public var nextCursor: Swift.String? - /// Creates a new `PagingPayload`. + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/responses/404/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadsGetInstance.Output.NotFound.Body + /// Creates a new `NotFound`. /// /// - Parameters: - /// - total: - /// - limit: - /// - nextCursor: - public init( - total: Swift.Int? = nil, - limit: Swift.Int, - nextCursor: Swift.String? = nil - ) { - self.total = total - self.limit = limit - self.nextCursor = nextCursor - } - public enum CodingKeys: String, CodingKey { - case total - case limit - case nextCursor + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsGetInstance.Output.NotFound.Body) { + self.body = body } } - /// - Remark: Generated from `#/components/schemas/PagingInformation/paging`. - public var paging: Components.Schemas.PagingInformation.PagingPayload - /// Creates a new `PagingInformation`. + /// Not found error /// - /// - Parameters: - /// - paging: - public init(paging: Components.Schemas.PagingInformation.PagingPayload) { - self.paging = paging - } - public enum CodingKeys: String, CodingKey { - case paging - } - } - /// - Remark: Generated from `#/components/schemas/DocumentLinks`. - public struct DocumentLinks: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/DocumentLinks/self`. - public var _self: Swift.String - /// Creates a new `DocumentLinks`. + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/get(buildUploads_getInstance)/responses/404`. /// - /// - Parameters: - /// - _self: - public init(_self: Swift.String) { - self._self = _self - } - public enum CodingKeys: String, CodingKey { - case _self = "self" - } - } - /// - Remark: Generated from `#/components/schemas/ResourceLinks`. - public struct ResourceLinks: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/ResourceLinks/self`. - public var _self: Swift.String? - /// Creates a new `ResourceLinks`. + /// HTTP response code: `404 notFound`. + case notFound(Operations.BuildUploadsGetInstance.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. /// - /// - Parameters: - /// - _self: - public init(_self: Swift.String? = nil) { - self._self = _self + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.BuildUploadsGetInstance.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } } - public enum CodingKeys: String, CodingKey { - case _self = "self" + public struct TooManyRequests: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/responses/429/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/GET/responses/429/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadsGetInstance.Output.TooManyRequests.Body + /// Creates a new `TooManyRequests`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsGetInstance.Output.TooManyRequests.Body) { + self.body = body + } } - } - /// - Remark: Generated from `#/components/schemas/RelationshipLinks`. - public struct RelationshipLinks: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/RelationshipLinks/self`. - public var _self: Swift.String? - /// - Remark: Generated from `#/components/schemas/RelationshipLinks/related`. - public var related: Swift.String? - /// Creates a new `RelationshipLinks`. + /// Rate limit exceeded error /// - /// - Parameters: - /// - _self: - /// - related: - public init( - _self: Swift.String? = nil, - related: Swift.String? = nil - ) { - self._self = _self - self.related = related - } - public enum CodingKeys: String, CodingKey { - case _self = "self" - case related - } - } - /// - Remark: Generated from `#/components/schemas/BundleIdPlatform`. - public struct BundleIdPlatform: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/BundleIdPlatform/value1`. - @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { - case ios = "IOS" - case macOs = "MAC_OS" - case universal = "UNIVERSAL" - } - /// - Remark: Generated from `#/components/schemas/BundleIdPlatform/value1`. - public var value1: Components.Schemas.BundleIdPlatform.Value1Payload? - /// - Remark: Generated from `#/components/schemas/BundleIdPlatform/value2`. - public var value2: Swift.String? - /// Creates a new `BundleIdPlatform`. + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/get(buildUploads_getInstance)/responses/429`. /// - /// - Parameters: - /// - value1: - /// - value2: - public init( - value1: Components.Schemas.BundleIdPlatform.Value1Payload? = nil, - value2: Swift.String? = nil - ) { - self.value1 = value1 - self.value2 = value2 + /// HTTP response code: `429 tooManyRequests`. + case tooManyRequests(Operations.BuildUploadsGetInstance.Output.TooManyRequests) + /// The associated value of the enum case if `self` is `.tooManyRequests`. + /// + /// - Throws: An error if `self` is not `.tooManyRequests`. + /// - SeeAlso: `.tooManyRequests`. + public var tooManyRequests: Operations.BuildUploadsGetInstance.Output.TooManyRequests { + get throws { + switch self { + case let .tooManyRequests(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "tooManyRequests", + response: self + ) + } + } } - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self.value1 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) } - do { - self.value2 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" } - try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( - [ - self.value1, - self.value2 - ], - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) } - public func encode(to encoder: any Encoder) throws { - try encoder.encodeFirstNonNilValueToSingleValueContainer([ - self.value1, - self.value2 - ]) + public static var allCases: [Self] { + [ + .json + ] } } - /// - Remark: Generated from `#/components/schemas/CapabilityOption`. - public struct CapabilityOption: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CapabilityOption/key`. - public struct KeyPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CapabilityOption/key/value1`. - @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, 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" - } - /// - Remark: Generated from `#/components/schemas/CapabilityOption/key/value1`. - public var value1: Components.Schemas.CapabilityOption.KeyPayload.Value1Payload? - /// - Remark: Generated from `#/components/schemas/CapabilityOption/key/value2`. - public var value2: Swift.String? - /// Creates a new `KeyPayload`. + } + /// - Remark: HTTP `DELETE /v1/buildUploads/{id}`. + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/delete(buildUploads_deleteInstance)`. + public enum BuildUploadsDeleteInstance { + public static let id: Swift.String = "buildUploads_deleteInstance" + public struct Input: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/DELETE/path`. + public struct Path: Sendable, Hashable { + /// the id of the requested resource + /// + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/DELETE/path/id`. + public var id: Swift.String + /// Creates a new `Path`. /// /// - Parameters: - /// - value1: - /// - value2: - public init( - value1: Components.Schemas.CapabilityOption.KeyPayload.Value1Payload? = nil, - value2: Swift.String? = nil - ) { - self.value1 = value1 - self.value2 = value2 - } - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self.value1 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) - } - do { - self.value2 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) - } - try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( - [ - self.value1, - self.value2 - ], - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) + /// - id: the id of the requested resource + public init(id: Swift.String) { + self.id = id } - public func encode(to encoder: any Encoder) throws { - try encoder.encodeFirstNonNilValueToSingleValueContainer([ - self.value1, - self.value2 - ]) + } + public var path: Operations.BuildUploadsDeleteInstance.Input.Path + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/DELETE/header`. + public struct Headers: Sendable, Hashable { + public var accept: [OpenAPIRuntime.AcceptHeaderContentType] + /// Creates a new `Headers`. + /// + /// - Parameters: + /// - accept: + public init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { + self.accept = accept } } - /// - Remark: Generated from `#/components/schemas/CapabilityOption/key`. - public var key: Components.Schemas.CapabilityOption.KeyPayload? - /// - Remark: Generated from `#/components/schemas/CapabilityOption/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/CapabilityOption/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/CapabilityOption/enabledByDefault`. - public var enabledByDefault: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/CapabilityOption/enabled`. - public var enabled: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/CapabilityOption/supportsWildcard`. - public var supportsWildcard: Swift.Bool? - /// Creates a new `CapabilityOption`. + public var headers: Operations.BuildUploadsDeleteInstance.Input.Headers + /// Creates a new `Input`. /// /// - Parameters: - /// - key: - /// - name: - /// - description: - /// - enabledByDefault: - /// - enabled: - /// - supportsWildcard: + /// - path: + /// - headers: public init( - key: Components.Schemas.CapabilityOption.KeyPayload? = nil, - name: Swift.String? = nil, - description: Swift.String? = nil, - enabledByDefault: Swift.Bool? = nil, - enabled: Swift.Bool? = nil, - supportsWildcard: Swift.Bool? = nil + path: Operations.BuildUploadsDeleteInstance.Input.Path, + headers: Operations.BuildUploadsDeleteInstance.Input.Headers = .init() ) { - self.key = key - self.name = name - self.description = description - self.enabledByDefault = enabledByDefault - self.enabled = enabled - self.supportsWildcard = supportsWildcard - } - public enum CodingKeys: String, CodingKey { - case key - case name - case description - case enabledByDefault - case enabled - case supportsWildcard + self.path = path + self.headers = headers } } - /// - Remark: Generated from `#/components/schemas/CapabilitySetting`. - public struct CapabilitySetting: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/key`. - public struct KeyPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/key/value1`. - @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { - case icloudVersion = "ICLOUD_VERSION" - case dataProtectionPermissionLevel = "DATA_PROTECTION_PERMISSION_LEVEL" - case appleIdAuthAppConsent = "APPLE_ID_AUTH_APP_CONSENT" - } - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/key/value1`. - public var value1: Components.Schemas.CapabilitySetting.KeyPayload.Value1Payload? - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/key/value2`. - public var value2: Swift.String? - /// Creates a new `KeyPayload`. - /// - /// - Parameters: - /// - value1: - /// - value2: - public init( - value1: Components.Schemas.CapabilitySetting.KeyPayload.Value1Payload? = nil, - value2: Swift.String? = nil - ) { - self.value1 = value1 - self.value2 = value2 - } - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self.value1 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) - } - do { - self.value2 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) + @frozen public enum Output: Sendable, Hashable { + public struct NoContent: Sendable, Hashable { + /// Creates a new `NoContent`. + public init() {} + } + /// Success (no content) + /// + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/delete(buildUploads_deleteInstance)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + case noContent(Operations.BuildUploadsDeleteInstance.Output.NoContent) + /// Success (no content) + /// + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/delete(buildUploads_deleteInstance)/responses/204`. + /// + /// HTTP response code: `204 noContent`. + public static var noContent: Self { + .noContent(.init()) + } + /// The associated value of the enum case if `self` is `.noContent`. + /// + /// - Throws: An error if `self` is not `.noContent`. + /// - SeeAlso: `.noContent`. + public var noContent: Operations.BuildUploadsDeleteInstance.Output.NoContent { + get throws { + switch self { + case let .noContent(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "noContent", + response: self + ) } - try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( - [ - self.value1, - self.value2 - ], - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - try encoder.encodeFirstNonNilValueToSingleValueContainer([ - self.value1, - self.value2 - ]) } } - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/key`. - public var key: Components.Schemas.CapabilitySetting.KeyPayload? - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/name`. - public var name: Swift.String? - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/description`. - public var description: Swift.String? - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/enabledByDefault`. - public var enabledByDefault: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/visible`. - public var visible: Swift.Bool? - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/allowedInstances`. - public struct AllowedInstancesPayload: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/allowedInstances/value1`. - @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { - case entry = "ENTRY" - case single = "SINGLE" - case multiple = "MULTIPLE" + public struct BadRequest: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/DELETE/responses/400/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/DELETE/responses/400/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } } - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/allowedInstances/value1`. - public var value1: Components.Schemas.CapabilitySetting.AllowedInstancesPayload.Value1Payload? - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/allowedInstances/value2`. - public var value2: Swift.String? - /// Creates a new `AllowedInstancesPayload`. + /// Received HTTP response body + public var body: Operations.BuildUploadsDeleteInstance.Output.BadRequest.Body + /// Creates a new `BadRequest`. /// /// - Parameters: - /// - value1: - /// - value2: - public init( - value1: Components.Schemas.CapabilitySetting.AllowedInstancesPayload.Value1Payload? = nil, - value2: Swift.String? = nil - ) { - self.value1 = value1 - self.value2 = value2 + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsDeleteInstance.Output.BadRequest.Body) { + self.body = body } - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self.value1 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) + } + /// Parameter error(s) + /// + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/delete(buildUploads_deleteInstance)/responses/400`. + /// + /// HTTP response code: `400 badRequest`. + case badRequest(Operations.BuildUploadsDeleteInstance.Output.BadRequest) + /// The associated value of the enum case if `self` is `.badRequest`. + /// + /// - Throws: An error if `self` is not `.badRequest`. + /// - SeeAlso: `.badRequest`. + public var badRequest: Operations.BuildUploadsDeleteInstance.Output.BadRequest { + get throws { + switch self { + case let .badRequest(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "badRequest", + response: self + ) } - do { - self.value2 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) + } + } + public struct Unauthorized: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/DELETE/responses/401/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/DELETE/responses/401/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } } - try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( - [ - self.value1, - self.value2 - ], - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) } - public func encode(to encoder: any Encoder) throws { - try encoder.encodeFirstNonNilValueToSingleValueContainer([ - self.value1, - self.value2 - ]) + /// Received HTTP response body + public var body: Operations.BuildUploadsDeleteInstance.Output.Unauthorized.Body + /// Creates a new `Unauthorized`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsDeleteInstance.Output.Unauthorized.Body) { + self.body = body } } - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/allowedInstances`. - public var allowedInstances: Components.Schemas.CapabilitySetting.AllowedInstancesPayload? - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/minInstances`. - public var minInstances: Swift.Int? - /// - Remark: Generated from `#/components/schemas/CapabilitySetting/options`. - public var options: [Components.Schemas.CapabilityOption]? - /// Creates a new `CapabilitySetting`. + /// Unauthorized error(s) /// - /// - Parameters: - /// - key: - /// - name: - /// - description: - /// - enabledByDefault: - /// - visible: - /// - allowedInstances: - /// - minInstances: - /// - options: - public init( - key: Components.Schemas.CapabilitySetting.KeyPayload? = nil, - name: Swift.String? = nil, - description: Swift.String? = nil, - enabledByDefault: Swift.Bool? = nil, - visible: Swift.Bool? = nil, - allowedInstances: Components.Schemas.CapabilitySetting.AllowedInstancesPayload? = nil, - minInstances: Swift.Int? = nil, - options: [Components.Schemas.CapabilityOption]? = nil - ) { - self.key = key - self.name = name - self.description = description - self.enabledByDefault = enabledByDefault - self.visible = visible - self.allowedInstances = allowedInstances - self.minInstances = minInstances - self.options = options - } - public enum CodingKeys: String, CodingKey { - case key - case name - case description - case enabledByDefault - case visible - case allowedInstances - case minInstances - case options + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/delete(buildUploads_deleteInstance)/responses/401`. + /// + /// HTTP response code: `401 unauthorized`. + case unauthorized(Operations.BuildUploadsDeleteInstance.Output.Unauthorized) + /// The associated value of the enum case if `self` is `.unauthorized`. + /// + /// - Throws: An error if `self` is not `.unauthorized`. + /// - SeeAlso: `.unauthorized`. + public var unauthorized: Operations.BuildUploadsDeleteInstance.Output.Unauthorized { + get throws { + switch self { + case let .unauthorized(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "unauthorized", + response: self + ) + } + } } - } - /// - Remark: Generated from `#/components/schemas/CapabilityType`. - public struct CapabilityType: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CapabilityType/value1`. - @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, 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" + public struct Forbidden: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/DELETE/responses/403/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/DELETE/responses/403/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } + } + /// Received HTTP response body + public var body: Operations.BuildUploadsDeleteInstance.Output.Forbidden.Body + /// Creates a new `Forbidden`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsDeleteInstance.Output.Forbidden.Body) { + self.body = body + } } - /// - Remark: Generated from `#/components/schemas/CapabilityType/value1`. - public var value1: Components.Schemas.CapabilityType.Value1Payload? - /// - Remark: Generated from `#/components/schemas/CapabilityType/value2`. - public var value2: Swift.String? - /// Creates a new `CapabilityType`. + /// Forbidden error /// - /// - Parameters: - /// - value1: - /// - value2: - public init( - value1: Components.Schemas.CapabilityType.Value1Payload? = nil, - value2: Swift.String? = nil - ) { - self.value1 = value1 - self.value2 = value2 + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/delete(buildUploads_deleteInstance)/responses/403`. + /// + /// HTTP response code: `403 forbidden`. + case forbidden(Operations.BuildUploadsDeleteInstance.Output.Forbidden) + /// The associated value of the enum case if `self` is `.forbidden`. + /// + /// - Throws: An error if `self` is not `.forbidden`. + /// - SeeAlso: `.forbidden`. + public var forbidden: Operations.BuildUploadsDeleteInstance.Output.Forbidden { + get throws { + switch self { + case let .forbidden(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "forbidden", + response: self + ) + } + } } - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self.value1 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) + public struct NotFound: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/DELETE/responses/404/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/DELETE/responses/404/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } } - do { - self.value2 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) + /// Received HTTP response body + public var body: Operations.BuildUploadsDeleteInstance.Output.NotFound.Body + /// Creates a new `NotFound`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsDeleteInstance.Output.NotFound.Body) { + self.body = body } - try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( - [ - self.value1, - self.value2 - ], - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - try encoder.encodeFirstNonNilValueToSingleValueContainer([ - self.value1, - self.value2 - ]) - } - } - /// - Remark: Generated from `#/components/schemas/CertificateType`. - public struct CertificateType: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/CertificateType/value1`. - @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { - case applePay = "APPLE_PAY" - case applePayMerchantIdentity = "APPLE_PAY_MERCHANT_IDENTITY" - case applePayPspIdentity = "APPLE_PAY_PSP_IDENTITY" - case applePayRsa = "APPLE_PAY_RSA" - case developerIdKext = "DEVELOPER_ID_KEXT" - case developerIdKextG2 = "DEVELOPER_ID_KEXT_G2" - case developerIdApplication = "DEVELOPER_ID_APPLICATION" - case developerIdApplicationG2 = "DEVELOPER_ID_APPLICATION_G2" - case development = "DEVELOPMENT" - case distribution = "DISTRIBUTION" - case identityAccess = "IDENTITY_ACCESS" - case iosDevelopment = "IOS_DEVELOPMENT" - case iosDistribution = "IOS_DISTRIBUTION" - case macAppDistribution = "MAC_APP_DISTRIBUTION" - case macInstallerDistribution = "MAC_INSTALLER_DISTRIBUTION" - case macAppDevelopment = "MAC_APP_DEVELOPMENT" - case passTypeId = "PASS_TYPE_ID" - case passTypeIdWithNfc = "PASS_TYPE_ID_WITH_NFC" } - /// - Remark: Generated from `#/components/schemas/CertificateType/value1`. - public var value1: Components.Schemas.CertificateType.Value1Payload? - /// - Remark: Generated from `#/components/schemas/CertificateType/value2`. - public var value2: Swift.String? - /// Creates a new `CertificateType`. + /// Not found error /// - /// - Parameters: - /// - value1: - /// - value2: - public init( - value1: Components.Schemas.CertificateType.Value1Payload? = nil, - value2: Swift.String? = nil - ) { - self.value1 = value1 - self.value2 = value2 + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/delete(buildUploads_deleteInstance)/responses/404`. + /// + /// HTTP response code: `404 notFound`. + case notFound(Operations.BuildUploadsDeleteInstance.Output.NotFound) + /// The associated value of the enum case if `self` is `.notFound`. + /// + /// - Throws: An error if `self` is not `.notFound`. + /// - SeeAlso: `.notFound`. + public var notFound: Operations.BuildUploadsDeleteInstance.Output.NotFound { + get throws { + switch self { + case let .notFound(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "notFound", + response: self + ) + } + } } - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self.value1 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) + public struct TooManyRequests: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/DELETE/responses/429/content`. + @frozen public enum Body: Sendable, Hashable { + /// - Remark: Generated from `#/paths/v1/buildUploads/{id}/DELETE/responses/429/content/application\/json`. + case json(Components.Schemas.ErrorResponse) + /// The associated value of the enum case if `self` is `.json`. + /// + /// - Throws: An error if `self` is not `.json`. + /// - SeeAlso: `.json`. + public var json: Components.Schemas.ErrorResponse { + get throws { + switch self { + case let .json(body): + return body + } + } + } } - do { - self.value2 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) + /// Received HTTP response body + public var body: Operations.BuildUploadsDeleteInstance.Output.TooManyRequests.Body + /// Creates a new `TooManyRequests`. + /// + /// - Parameters: + /// - body: Received HTTP response body + public init(body: Operations.BuildUploadsDeleteInstance.Output.TooManyRequests.Body) { + self.body = body } - try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( - [ - self.value1, - self.value2 - ], - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) - } - public func encode(to encoder: any Encoder) throws { - try encoder.encodeFirstNonNilValueToSingleValueContainer([ - self.value1, - self.value2 - ]) - } - } - /// - Remark: Generated from `#/components/schemas/SubscriptionStatusUrlVersion`. - public struct SubscriptionStatusUrlVersion: Codable, Hashable, Sendable { - /// - Remark: Generated from `#/components/schemas/SubscriptionStatusUrlVersion/value1`. - @frozen public enum Value1Payload: String, Codable, Hashable, Sendable, CaseIterable { - case v1 = "V1" - case v2 = "V2" } - /// - Remark: Generated from `#/components/schemas/SubscriptionStatusUrlVersion/value1`. - public var value1: Components.Schemas.SubscriptionStatusUrlVersion.Value1Payload? - /// - Remark: Generated from `#/components/schemas/SubscriptionStatusUrlVersion/value2`. - public var value2: Swift.String? - /// Creates a new `SubscriptionStatusUrlVersion`. + /// Rate limit exceeded error /// - /// - Parameters: - /// - value1: - /// - value2: - public init( - value1: Components.Schemas.SubscriptionStatusUrlVersion.Value1Payload? = nil, - value2: Swift.String? = nil - ) { - self.value1 = value1 - self.value2 = value2 + /// - Remark: Generated from `#/paths//v1/buildUploads/{id}/delete(buildUploads_deleteInstance)/responses/429`. + /// + /// HTTP response code: `429 tooManyRequests`. + case tooManyRequests(Operations.BuildUploadsDeleteInstance.Output.TooManyRequests) + /// The associated value of the enum case if `self` is `.tooManyRequests`. + /// + /// - Throws: An error if `self` is not `.tooManyRequests`. + /// - SeeAlso: `.tooManyRequests`. + public var tooManyRequests: Operations.BuildUploadsDeleteInstance.Output.TooManyRequests { + get throws { + switch self { + case let .tooManyRequests(response): + return response + default: + try throwUnexpectedResponseStatus( + expectedStatus: "tooManyRequests", + response: self + ) + } + } } - public init(from decoder: any Decoder) throws { - var errors: [any Error] = [] - do { - self.value1 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) + /// Undocumented response. + /// + /// A response with a code that is not documented in the OpenAPI document. + case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload) + } + @frozen public enum AcceptableContentType: AcceptableProtocol { + case json + case other(Swift.String) + public init?(rawValue: Swift.String) { + switch rawValue.lowercased() { + case "application/json": + self = .json + default: + self = .other(rawValue) } - do { - self.value2 = try decoder.decodeFromSingleValueContainer() - } catch { - errors.append(error) + } + public var rawValue: Swift.String { + switch self { + case let .other(string): + return string + case .json: + return "application/json" } - try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( - [ - self.value1, - self.value2 - ], - type: Self.self, - codingPath: decoder.codingPath, - errors: errors - ) } - public func encode(to encoder: any Encoder) throws { - try encoder.encodeFirstNonNilValueToSingleValueContainer([ - self.value1, - self.value2 - ]) + public static var allCases: [Self] { + [ + .json + ] } } } - /// Types generated from the `#/components/parameters` section of the OpenAPI document. - public enum Parameters {} - /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. - public enum RequestBodies {} - /// Types generated from the `#/components/responses` section of the OpenAPI document. - public enum Responses {} - /// Types generated from the `#/components/headers` section of the OpenAPI document. - public enum Headers {} -} - -/// API operations, with input and output types, generated from `#/paths` in the OpenAPI document. -public enum Operations { /// - Remark: HTTP `POST /v1/bundleIdCapabilities`. /// - Remark: Generated from `#/paths//v1/bundleIdCapabilities/post(bundleIdCapabilities_createInstance)`. public enum BundleIdCapabilitiesCreateInstance { @@ -8363,6 +13719,7 @@ public enum Operations { case inAppPurchases = "inAppPurchases" case subscriptionGroups = "subscriptionGroups" case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case performanceOverviews = "performanceOverviews" case perfPowerMetrics = "perfPowerMetrics" case appCustomProductPages = "appCustomProductPages" case inAppPurchasesV2 = "inAppPurchasesV2" @@ -8379,6 +13736,7 @@ public enum Operations { case marketplaceSearchDetail = "marketplaceSearchDetail" case buildUploads = "buildUploads" case backgroundAssets = "backgroundAssets" + case assetLibrary = "assetLibrary" case betaFeedbackScreenshotSubmissions = "betaFeedbackScreenshotSubmissions" case betaFeedbackCrashSubmissions = "betaFeedbackCrashSubmissions" case searchKeywords = "searchKeywords" @@ -9307,6 +14665,7 @@ public enum Operations { case inAppPurchases = "inAppPurchases" case subscriptionGroups = "subscriptionGroups" case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case performanceOverviews = "performanceOverviews" case perfPowerMetrics = "perfPowerMetrics" case appCustomProductPages = "appCustomProductPages" case inAppPurchasesV2 = "inAppPurchasesV2" @@ -9323,6 +14682,7 @@ public enum Operations { case marketplaceSearchDetail = "marketplaceSearchDetail" case buildUploads = "buildUploads" case backgroundAssets = "backgroundAssets" + case assetLibrary = "assetLibrary" case betaFeedbackScreenshotSubmissions = "betaFeedbackScreenshotSubmissions" case betaFeedbackCrashSubmissions = "betaFeedbackCrashSubmissions" case searchKeywords = "searchKeywords" @@ -16812,6 +22172,7 @@ public enum Operations { case inAppPurchases = "inAppPurchases" case subscriptionGroups = "subscriptionGroups" case gameCenterEnabledVersions = "gameCenterEnabledVersions" + case performanceOverviews = "performanceOverviews" case perfPowerMetrics = "perfPowerMetrics" case appCustomProductPages = "appCustomProductPages" case inAppPurchasesV2 = "inAppPurchasesV2" @@ -16828,6 +22189,7 @@ public enum Operations { case marketplaceSearchDetail = "marketplaceSearchDetail" case buildUploads = "buildUploads" case backgroundAssets = "backgroundAssets" + case assetLibrary = "assetLibrary" case betaFeedbackScreenshotSubmissions = "betaFeedbackScreenshotSubmissions" case betaFeedbackCrashSubmissions = "betaFeedbackCrashSubmissions" case searchKeywords = "searchKeywords" diff --git a/Sources/DeveloperAPI/openapi-generator-config.yaml b/Sources/DeveloperAPI/openapi-generator-config.yaml index a827e631..048b82be 100644 --- a/Sources/DeveloperAPI/openapi-generator-config.yaml +++ b/Sources/DeveloperAPI/openapi-generator-config.yaml @@ -10,3 +10,12 @@ filter: - Certificates - Devices - Profiles + # build uploads are only used for `xtool upload`. Select operations rather than whole tags, + # which would also pull in the relationship endpoints. + operations: + - buildUploads_createInstance + - buildUploads_getInstance + - buildUploads_deleteInstance + - buildUploadFiles_createInstance + - buildUploadFiles_getInstance + - buildUploadFiles_updateInstance From 44efc49e8e17c849a8ac4f9d45cc46fc0d3f68cb Mon Sep 17 00:00:00 2001 From: Ugo Mignon <56931733+TartanLeGrand@users.noreply.github.com> Date: Mon, 12 Oct 2026 12:31:19 +0200 Subject: [PATCH 3/7] xkit: add IPAInspector for local ipa checks Read the bundle ID, version and build from an ipa, and report what App Store Connect is known to reject: missing Info.plist keys, no compiled icon, a profile that isn't an App Store one, get-task-allow. Missing Xcode-stamped keys (DT*) are reported as warnings. --- Package.swift | 1 + .../XKit/AppStoreConnect/IPAInspector.swift | 205 +++++++++++++++++ Tests/XToolTests/IPAInspectorTests.swift | 217 ++++++++++++++++++ 3 files changed, 423 insertions(+) create mode 100644 Sources/XKit/AppStoreConnect/IPAInspector.swift create mode 100644 Tests/XToolTests/IPAInspectorTests.swift diff --git a/Package.swift b/Package.swift index 199a142c..12a58575 100644 --- a/Package.swift +++ b/Package.swift @@ -167,6 +167,7 @@ let package = Package( "XToolSupport", "PackLib", .product(name: "Crypto", package: "swift-crypto"), + .product(name: "Dependencies", package: "swift-dependencies"), .product(name: "X509", package: "swift-certificates"), ], swiftSettings: swiftSettings, diff --git a/Sources/XKit/AppStoreConnect/IPAInspector.swift b/Sources/XKit/AppStoreConnect/IPAInspector.swift new file mode 100644 index 00000000..80cfd0bf --- /dev/null +++ b/Sources/XKit/AppStoreConnect/IPAInspector.swift @@ -0,0 +1,205 @@ +import Foundation +import Dependencies +import XUtils + +/// The identity of an `.ipa`, as read from its `Info.plist`. +public struct IPAInfo: Hashable, Sendable { + /// `CFBundleIdentifier` + public var bundleID: String + /// `CFBundleShortVersionString` + public var version: String + /// `CFBundleVersion` + public var build: String + /// The App Store Connect platform (`IOS`, `MAC_OS`, `TV_OS`, `VISION_OS`) the build targets. + public var platform: String +} + +/// A problem found by the local pre-flight checks. +public struct IPAFinding: Hashable, Sendable, CustomStringConvertible { + public enum Severity: String, Sendable { + /// App Store Connect is expected to reject the build. + case error + /// App Store Connect may reject the build, or the build may be degraded. + case warning + } + + public var severity: Severity + public var message: String + + public var description: String { "\(severity.rawValue): \(message)" } +} + +/// The result of ``IPAInspector/inspect(ipa:)``. +public struct IPAReport: Sendable { + /// `nil` if the identifying keys could not be read, in which case `findings` explains why. + public var info: IPAInfo? + public var findings: [IPAFinding] + + public var errors: [IPAFinding] { findings.filter { $0.severity == .error } } + public var warnings: [IPAFinding] { findings.filter { $0.severity == .warning } } +} + +/// Reads an `.ipa` and checks, without any network access, the things that +/// App Store Connect is known to reject builds for. +/// +/// Apple doesn't expose a validation endpoint, so these checks are the only quick feedback +/// available before the (slow) server-side processing. +public struct IPAInspector: Sendable { + @Dependency(\.zipCompressor) private var compressor + + public init() {} + + /// Keys that Xcode stamps into the `Info.plist` and that App Store Connect checks. + static let xcodeStampedKeys = [ + "BuildMachineOSBuild", + "DTCompiler", + "DTPlatformBuild", + "DTPlatformName", + "DTPlatformVersion", + "DTSDKBuild", + "DTSDKName", + "DTXcode", + "DTXcodeBuild", + ] + + public func inspect(ipa: URL) async throws -> IPAReport { + // `ZIPCompressor` can only unpack the whole archive, not a few members of it. + let tmp = try TemporaryDirectory(name: "ipa-inspect") + try await compressor.decompress(file: ipa, in: tmp.url, progress: { _ in }) + return Self.inspect(extracted: tmp.url) + } + + /// Inspect an `.ipa` that was unzipped into `root`. + static func inspect(extracted root: URL) -> IPAReport { + var findings: [IPAFinding] = [] + func error(_ message: String) { findings.append(.init(severity: .error, message: message)) } + func warning(_ message: String) { findings.append(.init(severity: .warning, message: message)) } + + let fileManager = FileManager.default + let payload = root.appendingPathComponent("Payload", isDirectory: true) + let apps = ((try? fileManager.contentsOfDirectory(atPath: payload.path)) ?? []) + .filter { $0.hasSuffix(".app") } + .sorted() + guard apps.count == 1, let appName = apps.first else { + error( + apps.isEmpty + ? "The archive has no Payload/.app. Is it really an .ipa?" + : "Payload/ must contain exactly one .app, found \(apps.joined(separator: ", "))." + ) + return IPAReport(info: nil, findings: findings) + } + let app = payload.appendingPathComponent(appName, isDirectory: true) + + guard let infoData = fileManager.contents(atPath: app.appendingPathComponent("Info.plist").path), + let info = try? PropertyListSerialization.propertyList(from: infoData, format: nil) as? [String: Any] + else { + error("Payload/\(appName)/Info.plist is missing or is not a valid property list.") + return IPAReport(info: nil, findings: findings) + } + + var values: [String: String] = [:] + for key in ["CFBundleIdentifier", "CFBundleShortVersionString", "CFBundleVersion"] { + if let value = info[key] as? String, !value.isEmpty { + values[key] = value + } else { + error("Info.plist has no \(key).") + } + } + + checkIcon(in: info, app: app, error: { error($0) }) + checkProfile(in: app, bundleID: values["CFBundleIdentifier"], error: { error($0) }) + + let missing = xcodeStampedKeys.filter { info[$0] == nil } + if !missing.isEmpty { + warning( + "Info.plist is missing keys that Xcode normally adds (\(missing.joined(separator: ", "))). " + + "App Store Connect may reject the build with \"Unsupported SDK or Xcode version\"." + ) + } + + guard let bundleID = values["CFBundleIdentifier"], + let version = values["CFBundleShortVersionString"], + let build = values["CFBundleVersion"] + else { + return IPAReport(info: nil, findings: findings) + } + return IPAReport( + info: IPAInfo( + bundleID: bundleID, + version: version, + build: build, + platform: platform(for: info) + ), + findings: findings + ) + } + + private static func platform(for info: [String: Any]) -> String { + let name = (info["CFBundleSupportedPlatforms"] as? [String])?.first ?? info["DTPlatformName"] as? String + switch name?.lowercased() { + case "macosx": return "MAC_OS" + case "appletvos", "appletvsimulator": return "TV_OS" + case "xros", "xrsimulator": return "VISION_OS" + default: return "IOS" + } + } + + private static func checkIcon(in info: [String: Any], app: URL, error: (String) -> Void) { + // since iOS 11 the icon must come from a compiled asset catalog, referenced by name + let candidates = [info["CFBundleIcons"], info["CFBundleIcons~ipad"]] + let hasIconName = info["CFBundleIconName"] is String || candidates.contains { + let primary = ($0 as? [String: Any])?["CFBundlePrimaryIcon"] as? [String: Any] + return primary?["CFBundleIconName"] is String + } + if !hasIconName { + error("Info.plist has no CFBundleIconName: the app icon must come from an asset catalog.") + } + if !FileManager.default.fileExists(atPath: app.appendingPathComponent("Assets.car").path) { + error("The app has no Assets.car: the asset catalog must be compiled for App Store Connect.") + } + } + + private static func checkProfile(in app: URL, bundleID: String?, error: (String) -> Void) { + guard let data = FileManager.default.contents(atPath: app.appendingPathComponent("embedded.mobileprovision").path) + else { + error("The app has no embedded.mobileprovision: it must be signed with an App Store provisioning profile.") + return + } + guard let profile = Self.profilePlist(from: data) else { + error("embedded.mobileprovision could not be read.") + return + } + + if profile["ProvisionedDevices"] != nil || profile["ProvisionsAllDevices"] as? Bool == true { + error( + "embedded.mobileprovision is a development, ad-hoc or enterprise profile: " + + "App Store Connect requires an App Store distribution profile." + ) + } + + let entitlements = profile["Entitlements"] as? [String: Any] + if entitlements?["get-task-allow"] as? Bool == true { + error("embedded.mobileprovision grants get-task-allow, which App Store Connect rejects.") + } + + if let bundleID, let appID = entitlements?["application-identifier"] as? String { + // ".", or a wildcard such as ".*" or ".com.example.*" + let identifier = appID.drop { $0 != "." }.dropFirst() + let matches = identifier == bundleID[...] + || (identifier.hasSuffix("*") && bundleID.hasPrefix(identifier.dropLast())) + if !matches { + error("embedded.mobileprovision is for \(identifier), not for the bundle ID \(bundleID).") + } + } + } + + /// Extracts the property list from a `.mobileprovision`, which is a CMS envelope + /// that contains the (unencrypted) XML plist. + static func profilePlist(from data: Data) -> [String: Any]? { + guard let start = data.range(of: Data("".utf8), in: start.lowerBound.. URL { + let root = FileManager.default.temporaryDirectory + .appendingPathComponent("IPAInspectorTests-\(UUID().uuidString)", isDirectory: true) + let fileManager = FileManager.default + for name in payloadApps { + let app = root.appendingPathComponent("Payload/\(name)", isDirectory: true) + try fileManager.createDirectory(at: app, withIntermediateDirectories: true) + // only the first app is described, the others only need to exist + guard name == payloadApps[0] else { continue } + if let infoPlist { + try PropertyListSerialization.data(fromPropertyList: infoPlist, format: .binary, options: 0) + .write(to: app.appendingPathComponent("Info.plist")) + } + if hasAssetCatalog { + try Data("car".utf8).write(to: app.appendingPathComponent("Assets.car")) + } + if let profile { + // the real thing is a CMS envelope around the plist + var data = Data([0x30, 0x82, 0x01, 0x00, 0x06, 0x09]) + data += try PropertyListSerialization.data(fromPropertyList: profile, format: .xml, options: 0) + data += Data([0x31, 0x82, 0x02, 0x00]) + try data.write(to: app.appendingPathComponent("embedded.mobileprovision")) + } + } + return root + } + + func report() throws -> IPAReport { + let root = try write() + defer { try? FileManager.default.removeItem(at: root) } + return IPAInspector.inspect(extracted: root) + } +} + +private func messages(_ findings: [IPAFinding]) -> String { + findings.map(\.message).joined(separator: "\n") +} + +@Suite struct IPAInspectorTests { + @Test func acceptsABuildThatLooksLikeXcode() throws { + let report = try IPAFixture().report() + #expect(report.findings.isEmpty) + #expect(report.info == IPAInfo( + bundleID: "com.example.App", version: "1.2.3", build: "45", platform: "IOS" + )) + } + + @Test func warnsAboutKeysThatXcodeStamps() throws { + var fixture = IPAFixture() + fixture.infoPlist?["DTXcode"] = nil + fixture.infoPlist?["DTSDKBuild"] = nil + let report = try fixture.report() + + #expect(report.errors.isEmpty) + let warning = try #require(report.warnings.first) + #expect(report.warnings.count == 1) + #expect(warning.message.contains("DTSDKBuild, DTXcode")) + // it's still uploadable + #expect(report.info != nil) + } + + @Test func readsThePlatform() throws { + var fixture = IPAFixture() + fixture.infoPlist?["CFBundleSupportedPlatforms"] = ["XROS"] + #expect(try fixture.report().info?.platform == "VISION_OS") + } + + @Test(arguments: [ + ("CFBundleIdentifier", "CFBundleIdentifier"), + ("CFBundleShortVersionString", "CFBundleShortVersionString"), + ("CFBundleVersion", "CFBundleVersion"), + ]) + func requiresTheKeysThatIdentifyTheBuild(key: String, expected: String) throws { + var fixture = IPAFixture() + fixture.infoPlist?[key] = nil + let report = try fixture.report() + + #expect(report.info == nil) + #expect(messages(report.errors).contains("no \(expected)")) + } + + @Test func requiresExactlyOneApp() throws { + var none = IPAFixture() + none.payloadApps = [] + let noneReport = try none.report() + #expect(noneReport.info == nil) + #expect(messages(noneReport.errors).contains("no Payload")) + + var several = IPAFixture() + several.payloadApps = ["A.app", "B.app"] + let severalReport = try several.report() + #expect(severalReport.info == nil) + #expect(messages(severalReport.errors).contains("exactly one .app")) + } + + @Test func requiresAReadableInfoPlist() throws { + var fixture = IPAFixture() + fixture.infoPlist = nil + let report = try fixture.report() + #expect(report.info == nil) + #expect(messages(report.errors).contains("Info.plist is missing")) + } + + @Test func requiresACompiledIcon() throws { + var noCatalog = IPAFixture() + noCatalog.hasAssetCatalog = false + #expect(messages(try noCatalog.report().errors).contains("Assets.car")) + + var noName = IPAFixture() + noName.infoPlist?["CFBundleIcons"] = nil + noName.infoPlist?["CFBundleIconFile"] = "icon.png" + #expect(messages(try noName.report().errors).contains("CFBundleIconName")) + + // the name may also be on the iPad key, or at the top level + var ipad = IPAFixture() + ipad.infoPlist?["CFBundleIcons"] = nil + ipad.infoPlist?["CFBundleIcons~ipad"] = ["CFBundlePrimaryIcon": ["CFBundleIconName": "AppIcon"]] + #expect(try ipad.report().errors.isEmpty) + var topLevel = IPAFixture() + topLevel.infoPlist?["CFBundleIcons"] = nil + topLevel.infoPlist?["CFBundleIconName"] = "AppIcon" + #expect(try topLevel.report().errors.isEmpty) + } + + @Test func requiresAnAppStoreProfile() throws { + var missing = IPAFixture() + missing.profile = nil + #expect(messages(try missing.report().errors).contains("no embedded.mobileprovision")) + + var development = IPAFixture() + development.profile = [ + "ProvisionedDevices": ["00008030-000000000000802E"], + "Entitlements": ["application-identifier": "TEAM123456.com.example.App", "get-task-allow": true], + ] + let developmentErrors = messages(try development.report().errors) + #expect(developmentErrors.contains("development, ad-hoc or enterprise")) + #expect(developmentErrors.contains("get-task-allow")) + + var enterprise = IPAFixture() + enterprise.profile = [ + "ProvisionsAllDevices": true, + "Entitlements": ["application-identifier": "TEAM123456.com.example.App", "get-task-allow": false], + ] + #expect(messages(try enterprise.report().errors).contains("enterprise")) + } + + @Test func checksTheProfileMatchesTheBundleID() throws { + var other = IPAFixture() + other.profile = ["Entitlements": [ + "application-identifier": "TEAM123456.com.example.Other", "get-task-allow": false, + ]] + #expect(messages(try other.report().errors).contains("not for the bundle ID com.example.App")) + + for wildcard in ["TEAM123456.*", "TEAM123456.com.example.*"] { + var fixture = IPAFixture() + fixture.profile = ["Entitlements": ["application-identifier": wildcard, "get-task-allow": false]] + #expect(try fixture.report().errors.isEmpty, "\(wildcard)") + } + } + + @Test func inspectsAZippedIPA() async throws { + let root = try IPAFixture().write() + defer { try? FileManager.default.removeItem(at: root) } + let ipa = root.appendingPathComponent("App.ipa") + + let zip = Process() + zip.executableURL = URL(fileURLWithPath: "/usr/bin/env") + zip.arguments = ["zip", "-qr", ipa.path, "Payload"] + zip.currentDirectoryURL = root + try zip.run() + zip.waitUntilExit() + try #require(zip.terminationStatus == 0) + + let report = try await withDependencies { + $0.zipCompressor = .liveValue + } operation: { + try await IPAInspector().inspect(ipa: ipa) + } + #expect(report.findings.isEmpty) + #expect(report.info?.bundleID == "com.example.App") + } +} From 7a9983600c3091b3a495d596de631fd534a5f69d Mon Sep 17 00:00:00 2001 From: Ugo Mignon <56931733+TartanLeGrand@users.noreply.github.com> Date: Mon, 12 Oct 2026 12:31:20 +0200 Subject: [PATCH 4/7] xkit: add BuildUploader for App Store Connect Upload an ipa through the Build Uploads API: create the upload, reserve the file, send the parts to the pre-signed URLs without credentials, commit, and poll until Apple accepts or rejects the build, reporting its errors. Reads are retried, writes to App Store Connect are not, and an ambiguous commit is resolved by reading the file state. --- Package.swift | 3 + .../XKit/AppStoreConnect/BuildUploader.swift | 523 ++++++++++++++++++ .../OpenAPI/OpenAPIExtensibleEnum.swift | 2 + Tests/XToolTests/BuildUploaderTests.swift | 433 +++++++++++++++ Tests/XToolTests/MockHTTPClient.swift | 80 +++ 5 files changed, 1041 insertions(+) create mode 100644 Sources/XKit/AppStoreConnect/BuildUploader.swift create mode 100644 Tests/XToolTests/BuildUploaderTests.swift create mode 100644 Tests/XToolTests/MockHTTPClient.swift diff --git a/Package.swift b/Package.swift index 12a58575..68521ad8 100644 --- a/Package.swift +++ b/Package.swift @@ -166,8 +166,11 @@ let package = Package( "XKit", "XToolSupport", "PackLib", + .product(name: "ConcurrencyExtras", package: "swift-concurrency-extras"), .product(name: "Crypto", package: "swift-crypto"), .product(name: "Dependencies", package: "swift-dependencies"), + .product(name: "HTTPTypes", package: "swift-http-types"), + .product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"), .product(name: "X509", package: "swift-certificates"), ], swiftSettings: swiftSettings, diff --git a/Sources/XKit/AppStoreConnect/BuildUploader.swift b/Sources/XKit/AppStoreConnect/BuildUploader.swift new file mode 100644 index 00000000..30104d9c --- /dev/null +++ b/Sources/XKit/AppStoreConnect/BuildUploader.swift @@ -0,0 +1,523 @@ +import Foundation +import DeveloperAPI +import Dependencies +import HTTPTypes +import HTTPTypesFoundation +import OpenAPIRuntime + +/// Uploads a build to App Store Connect (and so to TestFlight) with the public +/// [Build Uploads](https://developer.apple.com/documentation/appstoreconnectapi/build-uploads) API. +/// +/// The flow is: create a build upload, reserve the file, send the file in parts to the +/// pre-signed URLs that Apple returns, commit the file, and then Apple processes the build. +public struct BuildUploader: Sendable { + public struct Configuration: Sendable { + /// The maximum number of tries for a request that is safe to repeat. + public var maxAttempts = 4 + /// The delay before the first retry. It doubles at every retry. + public var retryDelay: Duration = .seconds(1) + /// The delay between the first status checks. It grows up to `maxPollInterval`. + public var pollInterval: Duration = .seconds(5) + public var maxPollInterval: Duration = .seconds(30) + /// How long to wait for Apple to process the build before giving up. + public var timeout: Duration = .seconds(30 * 60) + /// The number of parts that are sent at the same time. + public var maxConcurrentParts = 4 + + public init() {} + } + + public enum Event: Sendable, Hashable { + case createdUpload(id: String) + case reservedFile(parts: Int) + case uploadedPart(completed: Int, total: Int) + case committedFile + /// App Store Connect's own name for the state, such as `PROCESSING`. + case processing(state: String) + } + + public struct Result: Sendable, Hashable { + public var uploadID: String + /// `COMPLETE` once Apple has accepted the build, otherwise the last state that was seen. + public var state: String + public var warnings: [String] + public var infos: [String] + } + + public enum Error: Swift.Error, LocalizedError, CustomStringConvertible { + /// The App Store Connect API answered with a non-2xx status. + case http(status: Int, details: String) + case appNotFound(bundleID: String) + case malformedResponse(String) + case unreadablePart(offset: Int64, length: Int64) + case partUploadFailed(partNumber: Int64?, underlying: Swift.Error) + /// Apple processed the build and rejected it. Each entry is `code: description`. + case processingFailed(uploadID: String, errors: [String]) + case timedOut(uploadID: String) + + public var description: String { + switch self { + case .http(let status, let details): + "App Store Connect answered HTTP \(status)\(details.isEmpty ? "" : ": \(details)")" + case .appNotFound(let bundleID): + "No app with the bundle ID \(bundleID) was found in App Store Connect. " + + "Create it there first, or pass its ID with --app-id." + case .malformedResponse(let what): + "Unexpected response from App Store Connect: \(what)." + case .unreadablePart(let offset, let length): + "Could not read \(length) bytes at offset \(offset) of the file." + case .partUploadFailed(let partNumber, let underlying): + "Uploading part \(partNumber.map(String.init) ?? "?") failed: \(underlying)" + case .processingFailed(let uploadID, let errors): + "App Store Connect rejected the build (upload \(uploadID)):\n" + + errors.map { "- \($0)" }.joined(separator: "\n") + case .timedOut(let uploadID): + "Timed out waiting for App Store Connect to process upload \(uploadID). " + + "It may still complete: check App Store Connect." + } + } + + public var errorDescription: String? { description } + } + + private let client: DeveloperAPIClient + private let configuration: Configuration + @Dependency(\.httpClient) private var httpClient + @Dependency(\.continuousClock) private var clock + + public init(key: ASCKey, configuration: Configuration = .init()) { + @Dependency(\.httpClient) var httpClient + self.configuration = configuration + self.client = DeveloperAPIClient( + // swiftlint:disable:next force_try + serverURL: try! Servers.Server1.url(), + configuration: .init(dateTranscoder: LenientISO8601DateTranscoder()), + transport: httpClient.asOpenAPITransport, + middlewares: [ + DeveloperAPIASCAuthMiddleware(key: key), + HTTPStatusMiddleware(), + LoggingMiddleware(), + ] + ) + } + + // MARK: - Resolving the app + + /// Finds the App Store Connect app ID for a bundle ID. + public func resolveApp(bundleID: String) async throws -> String { + // the identifier filter is not an exact match + let bundleIDs = try await retrying { + try await client.bundleIdsGetCollection(query: .init( + filter_lbrack_identifier_rbrack_: [bundleID] + )).ok.body.json.data + } + guard let resource = bundleIDs.first(where: { $0.attributes?.identifier == bundleID }) else { + throw Error.appNotFound(bundleID: bundleID) + } + do { + return try await retrying { + try await client.bundleIdsAppGetToOneRelated(path: .init(id: resource.id)).ok.body.json.data.id + } + } catch Error.http(status: 404, _) { + throw Error.appNotFound(bundleID: bundleID) + } + } + + // MARK: - Uploading + + /// Uploads `ipa` as a new build of the app `appID`. + /// + /// - Parameter wait: Whether to wait for Apple to finish processing the build. If it's `false` + /// the returned state is whatever Apple reported right after the upload. + public func upload( + ipa: URL, + info: IPAInfo, + appID: String, + wait: Bool = true, + onEvent: (Event) -> Void = { _ in } + ) async throws -> Result { + guard let fileSize = try FileManager.default.attributesOfItem(atPath: ipa.path)[.size] as? NSNumber else { + throw Error.malformedResponse("cannot read the size of \(ipa.lastPathComponent)") + } + + let uploadID = try await createUpload(info: info, appID: appID) + onEvent(.createdUpload(id: uploadID)) + + let fileID: String + do { + let reservation = try await reserveFile( + uploadID: uploadID, name: ipa.lastPathComponent, size: fileSize.int64Value + ) + fileID = reservation.id + onEvent(.reservedFile(parts: reservation.operations.count)) + try await send(ipa, operations: reservation.operations, fileID: fileID, onEvent: onEvent) + } catch { + // don't leave a dangling reservation behind + if !(error is CancellationError) { + _ = try? await client.buildUploadsDeleteInstance(path: .init(id: uploadID)) + } + throw error + } + + // Not covered by the cleanup above: if the commit's outcome is unknown, the build may well + // be processing and deleting the upload would throw it away. + try await commit(fileID: fileID) + onEvent(.committedFile) + + if wait { + return try await waitForProcessing(uploadID: uploadID, onEvent: onEvent) + } else { + return try await status(of: uploadID) + } + } + + private func createUpload(info: IPAInfo, appID: String) async throws -> String { + // not retried: a lost response could otherwise leave two uploads for the same build + let body = Components.Schemas.BuildUploadCreateRequest(data: .init( + _type: .buildUploads, + attributes: .init( + cfBundleShortVersionString: info.version, + cfBundleVersion: info.build, + platform: .init(value1: .init(rawValue: info.platform), value2: info.platform) + ), + relationships: .init(app: .init(data: .init(_type: .apps, id: appID))) + )) + return try await call { try await client.buildUploadsCreateInstance(body: .json(body)).created.body.json.data.id } + } + + private func reserveFile( + uploadID: String, + name: String, + size: Int64 + ) async throws -> (id: String, operations: [Components.Schemas.DeliveryFileUploadOperation]) { + let body = Components.Schemas.BuildUploadFileCreateRequest(data: .init( + _type: .buildUploadFiles, + attributes: .init( + assetType: .init(value1: .asset), + fileName: name, + fileSize: size, + uti: .init(value1: .com_apple_ipa) + ), + relationships: .init(buildUpload: .init(data: .init(_type: .buildUploads, id: uploadID))) + )) + let file = try await call { try await client.buildUploadFilesCreateInstance(body: .json(body)).created.body.json.data } + guard let operations = file.attributes?.uploadOperations, !operations.isEmpty else { + throw Error.malformedResponse("the reservation has no upload operations") + } + return (file.id, operations) + } + + private func send( + _ ipa: URL, + operations: [Components.Schemas.DeliveryFileUploadOperation], + fileID: String, + onEvent: (Event) -> Void + ) async throws { + var completed = 0 + try await withThrowingTaskGroup(of: Void.self) { group in + var pending = operations.makeIterator() + var running = 0 + + func startNext() -> Bool { + guard let operation = pending.next() else { return false } + group.addTask { try await sendPart(of: ipa, operation: operation, fileID: fileID) } + running += 1 + return true + } + + while running < configuration.maxConcurrentParts, startNext() {} + while running > 0 { + try await group.next() + running -= 1 + completed += 1 + onEvent(.uploadedPart(completed: completed, total: operations.count)) + _ = startNext() + } + } + } + + private func sendPart( + of ipa: URL, + operation: Components.Schemas.DeliveryFileUploadOperation, + fileID: String + ) async throws { + guard let offset = operation.offset, let length = operation.length, offset >= 0, length >= 0 + else { throw Error.malformedResponse("an upload operation is incomplete") } + + let data = try readPart(of: ipa, offset: offset, length: length) + + do { + var operation = operation + try await retrying(isRetryable: Self.isRetryablePut) { + // pre-signed URLs stop working at some point. The reservation can be read again to get new ones. + if let expiration = operation.expiration, expiration <= Date() { + operation = try await refreshed(operation, fileID: fileID) + } + guard let url = operation.url.flatMap({ URL(string: $0) }) else { + throw Error.malformedResponse("an upload operation has an invalid URL") + } + var request = HTTPRequest( + method: operation.method.flatMap { HTTPRequest.Method($0) } ?? .put, + url: url + ) + for header in operation.requestHeaders ?? [] { + if let name = header.name.flatMap({ HTTPField.Name($0) }), let value = header.value { + request.headerFields[name] = value + } + } + // The URL is pre-signed: sending our App Store Connect credentials to it would leak + // them to a third party (Apple's storage backend), so this goes through the bare client + // instead of `client`, and no `Authorization` header is ever added. + _ = try await httpClient.makeRequest(request, body: data) + } + } catch is CancellationError { + throw CancellationError() + } catch { + throw Error.partUploadFailed(partNumber: operation.partNumber, underlying: error) + } + } + + private func refreshed( + _ operation: Components.Schemas.DeliveryFileUploadOperation, + fileID: String + ) async throws -> Components.Schemas.DeliveryFileUploadOperation { + let file = try await retrying { + try await client.buildUploadFilesGetInstance(path: .init(id: fileID)).ok.body.json.data + } + let candidates = file.attributes?.uploadOperations ?? [] + guard let match = candidates.first(where: { $0.offset == operation.offset && $0.length == operation.length }) + else { throw Error.malformedResponse("the reservation no longer has part \(operation.partNumber ?? 0)") } + return match + } + + private func readPart(of ipa: URL, offset: Int64, length: Int64) throws -> Data { + let handle = try FileHandle(forReadingFrom: ipa) + defer { try? handle.close() } + try handle.seek(toOffset: UInt64(offset)) + guard let data = try handle.read(upToCount: Int(length)), data.count == Int(length) else { + throw Error.unreadablePart(offset: offset, length: length) + } + return data + } + + private func commit(fileID: String) async throws { + let body = Components.Schemas.BuildUploadFileUpdateRequest(data: .init( + _type: .buildUploadFiles, + id: fileID, + attributes: .init(uploaded: true) + )) + func patch() async throws { + _ = try await call { + try await client.buildUploadFilesUpdateInstance(path: .init(id: fileID), body: .json(body)).ok + } + } + do { + try await patch() + } catch where Self.isAmbiguous(error) { + // The request may or may not have been applied. Don't guess: ask. + let state = try await fileState(fileID) + switch state { + case "UPLOAD_COMPLETE", "COMPLETE": + return + case "AWAITING_UPLOAD": + // not applied. Committing twice is harmless so try once more. + try await patch() + default: + throw error + } + } + } + + private func fileState(_ fileID: String) async throws -> String? { + try await retrying { + try await client.buildUploadFilesGetInstance(path: .init(id: fileID)) + .ok.body.json.data.attributes?.assetDeliveryState?.state?.string + } + } + + // MARK: - Processing + + private func status(of uploadID: String) async throws -> Result { + let upload = try await retrying { + try await client.buildUploadsGetInstance(path: .init(id: uploadID)).ok.body.json.data + } + let state = upload.attributes?.state + return Result( + uploadID: uploadID, + state: state?.state?.string ?? "UNKNOWN", + warnings: (state?.warnings ?? []).map(\.summary), + infos: (state?.infos ?? []).map(\.summary) + ) + } + + private func waitForProcessing(uploadID: String, onEvent: (Event) -> Void) async throws -> Result { + var interval = configuration.pollInterval + var elapsed = Duration.zero + while true { + let upload = try await retrying { + try await client.buildUploadsGetInstance(path: .init(id: uploadID)).ok.body.json.data + } + let state = upload.attributes?.state + let name = state?.state?.string ?? "UNKNOWN" + onEvent(.processing(state: name)) + + switch name { + case "COMPLETE": + return Result( + uploadID: uploadID, + state: name, + warnings: (state?.warnings ?? []).map(\.summary), + infos: (state?.infos ?? []).map(\.summary) + ) + case "FAILED": + let errors = (state?.errors ?? []).map(\.summary) + throw Error.processingFailed( + uploadID: uploadID, + errors: errors.isEmpty ? ["no details were provided"] : errors + ) + default: + break + } + + guard elapsed < configuration.timeout else { throw Error.timedOut(uploadID: uploadID) } + try await clock.sleep(for: interval) + elapsed += interval + interval = min(interval * 1.5, configuration.maxPollInterval) + } + } + + // MARK: - Retries + + /// Runs a request to App Store Connect. + /// + /// OpenAPIRuntime wraps whatever a middleware throws in a `ClientError`. This puts our own errors back. + private func call(_ operation: () async throws -> T) async throws -> T { + do { + return try await operation() + } catch let error as ClientError { + throw error.underlyingError + } + } + + /// Retries `operation` with an exponential backoff. Only use this for requests that can safely be + /// repeated: reads, and writes to pre-signed URLs. + private func retrying( + isRetryable: (Swift.Error) -> Bool = BuildUploader.isRetryableRead, + _ operation: () async throws -> T + ) async throws -> T { + var delay = configuration.retryDelay + var attempt = 1 + while true { + do { + return try await call(operation) + } catch { + guard attempt < configuration.maxAttempts, isRetryable(error) else { throw error } + try await clock.sleep(for: delay) + delay *= 2 + attempt += 1 + } + } + } + + private static func isRetryableRead(_ error: Swift.Error) -> Bool { + if error is CancellationError { return false } + if case Error.http(let status, _) = error { + // App Store Connect sometimes answers 404 "There is no resource of type 'apps'" for an app + // that exists, and reads right after a write can lag behind it. + return status == 404 || isTransient(status: status) + } + // errors from the transport + return !(error is Error) + } + + private static func isRetryablePut(_ error: Swift.Error) -> Bool { + if error is CancellationError { return false } + if let error = error as? HTTPResponseError { return isTransient(status: error.status.code) } + return !(error is Error) + } + + /// Whether the write may have been applied even though we got an error. + private static func isAmbiguous(_ error: Swift.Error) -> Bool { + if error is CancellationError { return false } + if case Error.http(let status, _) = error { return status >= 500 || status == 408 } + return !(error is Error) + } + + private static func isTransient(status: Int) -> Bool { + status == 408 || status == 429 || status >= 500 + } +} + +// MARK: - Helpers + +extension Components.Schemas.StateDetail { + fileprivate var summary: String { + switch (code, description) { + case let (code?, description?): "\(code): \(description)" + case let (code?, nil): code + case let (nil, description?): description + case (nil, nil): "unknown" + } + } +} + +extension OpenAPIExtensibleEnum { + fileprivate var string: String? { value1?.rawValue ?? value2 } +} + +/// Turns non-2xx responses into ``BuildUploader/Error/http(status:details:)``, with Apple's own explanation. +private struct HTTPStatusMiddleware: ClientMiddleware { + func intercept( + _ request: HTTPRequest, + body: HTTPBody?, + baseURL: URL, + operationID: String, + next: @Sendable (HTTPRequest, HTTPBody?, URL) async throws -> (HTTPResponse, HTTPBody?) + ) async throws -> (HTTPResponse, HTTPBody?) { + let (response, responseBody) = try await next(request, body, baseURL) + guard response.status.kind != .successful else { return (response, responseBody) } + + var details = "" + if let responseBody, let data = try? await Data(collecting: responseBody, upTo: 1 << 20) { + details = Self.details(of: data) + } + throw BuildUploader.Error.http(status: response.status.code, details: details) + } + + /// `{"errors": [{"title": ..., "detail": ...}]}` + private static func details(of data: Data) -> String { + guard let object = try? JSONSerialization.jsonObject(with: data) as? [String: Any], + let errors = object["errors"] as? [[String: Any]] + else { return String(decoding: data.prefix(500), as: UTF8.self) } + return errors + .compactMap { error in + [error["code"], error["title"], error["detail"]] + .compactMap { $0 as? String } + .joined(separator: " - ") + } + .joined(separator: "; ") + } +} + +/// Apple writes some dates with fractional seconds and others without. +private struct LenientISO8601DateTranscoder: DateTranscoder { + func encode(_ date: Date) throws -> String { + let formatter = ISO8601DateFormatter() + formatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds] + return formatter.string(from: date) + } + + func decode(_ dateString: String) throws -> Date { + for options: ISO8601DateFormatter.Options in [ + [.withInternetDateTime, .withFractionalSeconds], + [.withInternetDateTime], + ] { + let formatter = ISO8601DateFormatter() + formatter.formatOptions = options + if let date = formatter.date(from: dateString) { return date } + } + throw DecodingError.dataCorrupted( + .init(codingPath: [], debugDescription: "Expected an ISO 8601 date, got \(dateString)") + ) + } +} diff --git a/Sources/XKit/DeveloperServices/OpenAPI/OpenAPIExtensibleEnum.swift b/Sources/XKit/DeveloperServices/OpenAPI/OpenAPIExtensibleEnum.swift index 68117323..6bce047d 100644 --- a/Sources/XKit/DeveloperServices/OpenAPI/OpenAPIExtensibleEnum.swift +++ b/Sources/XKit/DeveloperServices/OpenAPI/OpenAPIExtensibleEnum.swift @@ -19,6 +19,8 @@ extension OpenAPIExtensibleEnum { } } +extension Components.Schemas.AppMediaAssetState.StatePayload: OpenAPIExtensibleEnum {} +extension Components.Schemas.BuildUploadState: OpenAPIExtensibleEnum {} extension Components.Schemas.BundleIdPlatform: OpenAPIExtensibleEnum {} extension Components.Schemas.CapabilityOption.KeyPayload: OpenAPIExtensibleEnum {} extension Components.Schemas.CapabilitySetting.KeyPayload: OpenAPIExtensibleEnum {} diff --git a/Tests/XToolTests/BuildUploaderTests.swift b/Tests/XToolTests/BuildUploaderTests.swift new file mode 100644 index 00000000..d5b81a70 --- /dev/null +++ b/Tests/XToolTests/BuildUploaderTests.swift @@ -0,0 +1,433 @@ +import Foundation +import Testing +import ConcurrencyExtras +import Crypto +import Dependencies +import HTTPTypes +@testable import XKit + +private let links = #""links": {"self": "https://api.appstoreconnect.apple.com/v1/x"}"# + +private func uploadJSON( + state: String, + errors: [(code: String, description: String)] = [], + warnings: [(code: String, description: String)] = [] +) -> String { + func details(_ values: [(code: String, description: String)]) -> String { + values.map { #"{"code": "\#($0.code)", "description": "\#($0.description)"}"# }.joined(separator: ",") + } + return """ + {"data": {"type": "buildUploads", "id": "U1", "attributes": { + "cfBundleShortVersionString": "1.2.3", "cfBundleVersion": "45", "platform": "IOS", + "createdDate": "2026-10-11T10:00:00-07:00", + "state": {"state": "\(state)", "errors": [\(details(errors))], "warnings": [\(details(warnings))], "infos": []} + }}, \(links)} + """ +} + +private func fileJSON(state: String = "AWAITING_UPLOAD", operations: [String] = []) -> String { + """ + {"data": {"type": "buildUploadFiles", "id": "F1", "attributes": { + "fileName": "App.ipa", "fileSize": 7, + "assetDeliveryState": {"state": "\(state)"}, + "uploadOperations": [\(operations.joined(separator: ","))] + }}, \(links)} + """ +} + +private func operation(part: Int, offset: Int, length: Int, expiration: String = "2099-01-01T00:00:00.000Z") -> String { + """ + {"method": "PUT", "url": "https://uploads.example.com/part\(part)?signature=abc", "offset": \(offset), + "length": \(length), "partNumber": \(part), "expiration": "\(expiration)", + "requestHeaders": [{"name": "Content-Type", "value": "application/octet-stream"}]} + """ +} + +private let twoParts = fileJSON(operations: [ + operation(part: 1, offset: 0, length: 4), + operation(part: 2, offset: 4, length: 3), +]) + +private let info = IPAInfo(bundleID: "com.example.App", version: "1.2.3", build: "45", platform: "IOS") + +private func makeIPA() throws -> URL { + let url = FileManager.default.temporaryDirectory.appendingPathComponent("BuildUploaderTests-\(UUID().uuidString).ipa") + try Data("abcdefg".utf8).write(to: url) + return url +} + +private func makeKey() -> ASCKey { + ASCKey(id: "KEYID", issuerID: "ISSUER", pem: P256.Signing.PrivateKey().pemRepresentation) +} + +/// Run `operation` against `client`, without ever sleeping for real. +private func withMock( + _ client: MockHTTPClient, + _ operation: () async throws -> T +) async throws -> T { + try await withDependencies { + $0.httpClient = client + $0.continuousClock = ImmediateClock() + } operation: { + try await operation() + } +} + +/// The routes of a build upload that goes well. `override` can answer first, to inject failures. +private func happyPath( + processing: @escaping @Sendable () -> String = { uploadJSON(state: "COMPLETE") }, + override: @escaping @Sendable (MockHTTPClient.Request) -> MockHTTPClient.Response? = { _ in nil } +) -> MockHTTPClient { + MockHTTPClient { request in + if let response = override(request) { return response } + switch (request.method, request.path.split(separator: "?").first.map(String.init) ?? "") { + case (.post, "/v1/buildUploads"): + return .init(201, uploadJSON(state: "AWAITING_UPLOAD")) + case (.post, "/v1/buildUploadFiles"): + return .init(201, twoParts) + case (.put, _): + return .init(200) + case (.patch, "/v1/buildUploadFiles/F1"): + return .init(200, fileJSON(state: "UPLOAD_COMPLETE")) + case (.get, "/v1/buildUploads/U1"): + return .init(200, processing()) + case (.delete, "/v1/buildUploads/U1"): + return .init(204) + default: + return .init(404, #"{"errors": [{"title": "unexpected \#(request.method) \#(request.path)"}]}"#) + } + } +} + +@Suite struct BuildUploaderTests { + @Test func uploadsAllPartsAndWaitsForProcessing() async throws { + let ipa = try makeIPA() + defer { try? FileManager.default.removeItem(at: ipa) } + + let polls = LockIsolated(0) + let client = happyPath(processing: { + let count = polls.withValue { $0 += 1; return $0 } + return count < 3 + ? uploadJSON(state: "PROCESSING") + : uploadJSON(state: "COMPLETE", warnings: [("90001", "Missing push entitlement")]) + }) + + let events = LockIsolated<[BuildUploader.Event]>([]) + let result = try await withMock(client) { + try await BuildUploader(key: makeKey()).upload(ipa: ipa, info: info, appID: "APP1", wait: true) { event in + events.withValue { $0.append(event) } + } + } + + #expect(result.state == "COMPLETE") + #expect(result.uploadID == "U1") + #expect(result.warnings == ["90001: Missing push entitlement"]) + #expect(polls.value == 3) + + // the build upload is created for the right app and version + let create = try #require(client.recorded(.post, "/v1/buildUploads").first?.bodyJSON) + let data = try #require(create["data"] as? [String: Any]) + let attributes = try #require(data["attributes"] as? [String: Any]) + #expect(attributes["cfBundleShortVersionString"] as? String == "1.2.3") + #expect(attributes["cfBundleVersion"] as? String == "45") + #expect(attributes["platform"] as? String == "IOS") + #expect(create.description.contains("APP1")) + + // the file is reserved with its real size + let reservation = try #require(client.recorded(.post, "/v1/buildUploadFiles").first?.bodyJSON) + let reservedAttributes = try #require((reservation["data"] as? [String: Any])?["attributes"] as? [String: Any]) + #expect(reservedAttributes["fileSize"] as? Int == 7) + #expect(reservedAttributes["uti"] as? String == "com.apple.ipa") + #expect(reservedAttributes["assetType"] as? String == "ASSET") + + // each part is the right slice of the file, sent with Apple's headers + let puts = client.recorded(.put, "/part") + #expect(Set(puts.map(\.bodyString)) == ["abcd", "efg"]) + #expect(puts.allSatisfy { $0.host == "uploads.example.com" }) + #expect(puts.allSatisfy { $0.headers[.contentType] == "application/octet-stream" }) + // pre-signed URLs must never see our credentials + #expect(puts.allSatisfy { $0.headers[.authorization] == nil }) + let apiCalls = client.requests.value.filter { $0.host == "api.appstoreconnect.apple.com" } + #expect(!apiCalls.isEmpty) + #expect(apiCalls.allSatisfy { $0.headers[.authorization]?.hasPrefix("Bearer ") == true }) + + // then the file is committed, after all parts + let commit = try #require(client.recorded(.patch, "/v1/buildUploadFiles/F1").first) + let committed = try #require((commit.bodyJSON?["data"] as? [String: Any])?["attributes"] as? [String: Any]) + #expect(committed["uploaded"] as? Bool == true) + let order = client.requests.value.map { "\($0.method.rawValue)" } + #expect(order.lastIndex(of: "PUT")! < order.firstIndex(of: "PATCH")!) + + #expect(events.value.first == .createdUpload(id: "U1")) + #expect(events.value.contains(.reservedFile(parts: 2))) + #expect(events.value.contains(.uploadedPart(completed: 2, total: 2))) + #expect(events.value.contains(.committedFile)) + #expect(events.value.last == .processing(state: "COMPLETE")) + } + + @Test func doesNotWaitUnlessAsked() async throws { + let ipa = try makeIPA() + defer { try? FileManager.default.removeItem(at: ipa) } + + let client = happyPath(processing: { uploadJSON(state: "PROCESSING") }) + let result = try await withMock(client) { + try await BuildUploader(key: makeKey()).upload(ipa: ipa, info: info, appID: "APP1", wait: false) + } + #expect(result.state == "PROCESSING") + #expect(client.recorded(.get, "/v1/buildUploads/U1").count == 1) + } + + @Test func surfacesTheErrorsApplePutsInAFailedBuild() async throws { + let ipa = try makeIPA() + defer { try? FileManager.default.removeItem(at: ipa) } + + let client = happyPath(processing: { + uploadJSON(state: "FAILED", errors: [ + ("STATE_ERROR.VALIDATION_ERROR.90713", "Missing Info.plist value: CFBundleIconName"), + ("STATE_ERROR.VALIDATION_ERROR.90534", "Invalid SDK"), + ]) + }) + + let error = await #expect(throws: BuildUploader.Error.self) { + try await withMock(client) { + try await BuildUploader(key: makeKey()).upload(ipa: ipa, info: info, appID: "APP1", wait: true) + } + } + guard case .processingFailed(let uploadID, let errors) = error else { + Issue.record("unexpected error \(String(describing: error))") + return + } + #expect(uploadID == "U1") + #expect(errors == [ + "STATE_ERROR.VALIDATION_ERROR.90713: Missing Info.plist value: CFBundleIconName", + "STATE_ERROR.VALIDATION_ERROR.90534: Invalid SDK", + ]) + #expect(error?.description.contains("CFBundleIconName") == true) + } + + @Test func givesUpWhenProcessingNeverEnds() async throws { + let ipa = try makeIPA() + defer { try? FileManager.default.removeItem(at: ipa) } + + let client = happyPath(processing: { uploadJSON(state: "PROCESSING") }) + let error = await #expect(throws: BuildUploader.Error.self) { + try await withMock(client) { + try await BuildUploader(key: makeKey()).upload(ipa: ipa, info: info, appID: "APP1", wait: true) + } + } + guard case .timedOut(let uploadID) = error else { + Issue.record("unexpected error \(String(describing: error))") + return + } + #expect(uploadID == "U1") + } + + @Test func retriesAPartThatFailsTemporarily() async throws { + let ipa = try makeIPA() + defer { try? FileManager.default.removeItem(at: ipa) } + + let attempts = LockIsolated(0) + let client = happyPath(override: { request in + guard request.method == .put, request.path.hasPrefix("/part1") else { return nil } + return attempts.withValue { $0 += 1; return $0 } < 3 ? .init(503, "try later") : nil + }) + + let result = try await withMock(client) { + try await BuildUploader(key: makeKey()).upload(ipa: ipa, info: info, appID: "APP1", wait: true) + } + #expect(result.state == "COMPLETE") + #expect(client.recorded(.put, "/part1").count == 3) + // the other part was not affected + #expect(client.recorded(.put, "/part2").count == 1) + } + + @Test func abandonsTheUploadWhenAPartKeepsFailing() async throws { + let ipa = try makeIPA() + defer { try? FileManager.default.removeItem(at: ipa) } + + let client = happyPath(override: { request in + request.method == .put && request.path.hasPrefix("/part2") ? .init(500, "boom") : nil + }) + + let error = await #expect(throws: BuildUploader.Error.self) { + try await withMock(client) { + try await BuildUploader(key: makeKey()).upload(ipa: ipa, info: info, appID: "APP1", wait: true) + } + } + guard case .partUploadFailed(let part, _) = error else { + Issue.record("unexpected error \(String(describing: error))") + return + } + #expect(part == 2) + // bounded: 4 attempts, not forever + #expect(client.recorded(.put, "/part2").count == 4) + // nothing was committed, and the reservation is cleaned up + #expect(client.recorded(.patch, "/v1").isEmpty) + #expect(client.recorded(.delete, "/v1/buildUploads/U1").count == 1) + } + + @Test func doesNotRetryWritesToAppStoreConnect() async throws { + let ipa = try makeIPA() + defer { try? FileManager.default.removeItem(at: ipa) } + + let client = happyPath(override: { request in + request.method == .post && request.path == "/v1/buildUploads" + ? .init(409, #"{"errors": [{"code": "ENTITY_ERROR", "title": "Duplicate build", "detail": "Build 45 exists"}]}"#) + : nil + }) + + let error = await #expect(throws: BuildUploader.Error.self) { + try await withMock(client) { + try await BuildUploader(key: makeKey()).upload(ipa: ipa, info: info, appID: "APP1", wait: true) + } + } + guard case .http(let status, let details) = error else { + Issue.record("unexpected error \(String(describing: error))") + return + } + #expect(status == 409) + #expect(details.contains("Build 45 exists")) + #expect(client.recorded(.post, "/v1/buildUploads").count == 1) + #expect(client.recorded(.put, "/part").isEmpty) + } + + @Test func checksTheStateWhenTheCommitIsAmbiguous() async throws { + let ipa = try makeIPA() + defer { try? FileManager.default.removeItem(at: ipa) } + + // the PATCH reached Apple, but the answer was lost + let client = happyPath(override: { request in + request.method == .patch ? .init(502, "bad gateway") : nil + }) + let reads = LockIsolated(0) + let tracking = MockHTTPClient { request in + if request.method == .get, request.path == "/v1/buildUploadFiles/F1" { + reads.withValue { $0 += 1 } + return .init(200, fileJSON(state: "UPLOAD_COMPLETE")) + } + return try await client.handler(request) + } + + let result = try await withMock(tracking) { + try await BuildUploader(key: makeKey()).upload(ipa: ipa, info: info, appID: "APP1", wait: true) + } + #expect(result.state == "COMPLETE") + #expect(reads.value == 1) + // it was not committed a second time + #expect(tracking.recorded(.patch, "/v1/buildUploadFiles/F1").count == 1) + // and the upload was not thrown away + #expect(tracking.recorded(.delete, "/v1").isEmpty) + } + + @Test func commitsAgainWhenTheFirstCommitDidNotLand() async throws { + let ipa = try makeIPA() + defer { try? FileManager.default.removeItem(at: ipa) } + + let patches = LockIsolated(0) + let client = MockHTTPClient { request in + if request.method == .patch { + return patches.withValue { $0 += 1; return $0 } == 1 ? .init(503) : .init(200, fileJSON(state: "UPLOAD_COMPLETE")) + } + if request.method == .get, request.path == "/v1/buildUploadFiles/F1" { + return .init(200, fileJSON(state: "AWAITING_UPLOAD")) + } + return try await happyPath().handler(request) + } + + let result = try await withMock(client) { + try await BuildUploader(key: makeKey()).upload(ipa: ipa, info: info, appID: "APP1", wait: true) + } + #expect(result.state == "COMPLETE") + #expect(patches.value == 2) + } + + @Test func getsFreshURLsWhenAPartExpired() async throws { + let ipa = try makeIPA() + defer { try? FileManager.default.removeItem(at: ipa) } + + let expired = fileJSON(operations: [ + operation(part: 1, offset: 0, length: 4, expiration: "2001-01-01T00:00:00Z"), + operation(part: 2, offset: 4, length: 3), + ]) + let client = MockHTTPClient { request in + switch (request.method, request.path) { + case (.post, "/v1/buildUploadFiles"): + return .init(201, expired) + case (.get, "/v1/buildUploadFiles/F1"): + return .init(200, twoParts) + default: + return try await happyPath().handler(request) + } + } + + let result = try await withMock(client) { + try await BuildUploader(key: makeKey()).upload(ipa: ipa, info: info, appID: "APP1", wait: true) + } + #expect(result.state == "COMPLETE") + #expect(client.recorded(.get, "/v1/buildUploadFiles/F1").count == 1) + #expect(client.recorded(.put, "/part1").count == 1) + } + + @Test func resolvesTheAppFromTheBundleID() async throws { + let attempts = LockIsolated(0) + let client = MockHTTPClient { request in + switch request.path.split(separator: "?").first.map(String.init) ?? "" { + case "/v1/bundleIds": + // the identifier filter is not an exact match + return .init(200, """ + {"data": [ + {"type": "bundleIds", "id": "B0", "attributes": {"identifier": "com.example.App.extension"}}, + {"type": "bundleIds", "id": "B1", "attributes": {"identifier": "com.example.App"}} + ], \(links)} + """) + case "/v1/bundleIds/B1/app": + // App Store Connect sometimes answers 404 for an app that does exist + return attempts.withValue { $0 += 1; return $0 } == 1 + ? .init(404, #"{"errors": [{"title": "There is no resource of type 'apps'"}]}"#) + : .init(200, #"{"data": {"type": "apps", "id": "APP1"}, \#(links)}"#) + default: + return .init(500) + } + } + + let appID = try await withMock(client) { + try await BuildUploader(key: makeKey()).resolveApp(bundleID: "com.example.App") + } + #expect(appID == "APP1") + #expect(attempts.value == 2) + } + + @Test func reportsAnUnknownApp() async throws { + let client = MockHTTPClient { _ in .init(200, #"{"data": [], \#(links)}"#) } + + let error = await #expect(throws: BuildUploader.Error.self) { + try await withMock(client) { + try await BuildUploader(key: makeKey()).resolveApp(bundleID: "com.example.Missing") + } + } + guard case .appNotFound(let bundleID) = error else { + Issue.record("unexpected error \(String(describing: error))") + return + } + #expect(bundleID == "com.example.Missing") + } + + @Test func doesNotRetryReadsThatCannotSucceed() async throws { + let client = MockHTTPClient { _ in + .init(401, #"{"errors": [{"code": "NOT_AUTHORIZED", "title": "Authentication credentials are missing or invalid."}]}"#) + } + + let error = await #expect(throws: BuildUploader.Error.self) { + try await withMock(client) { + try await BuildUploader(key: makeKey()).resolveApp(bundleID: "com.example.App") + } + } + guard case .http(let status, let details) = error else { + Issue.record("unexpected error \(String(describing: error))") + return + } + #expect(status == 401) + #expect(details.contains("NOT_AUTHORIZED")) + #expect(client.requests.value.count == 1) + } +} diff --git a/Tests/XToolTests/MockHTTPClient.swift b/Tests/XToolTests/MockHTTPClient.swift new file mode 100644 index 00000000..075b339e --- /dev/null +++ b/Tests/XToolTests/MockHTTPClient.swift @@ -0,0 +1,80 @@ +import Foundation +import ConcurrencyExtras +import HTTPTypes +import OpenAPIRuntime +@testable import XKit + +/// An `HTTPClientProtocol` that answers from a closure and records what it was asked. +struct MockHTTPClient: HTTPClientProtocol, ClientTransport { + struct Request: Sendable { + var method: HTTPRequest.Method + var host: String + var path: String + var headers: HTTPFields + var body: Data + + var bodyString: String { String(decoding: body, as: UTF8.self) } + var bodyJSON: [String: Any]? { try? JSONSerialization.jsonObject(with: body) as? [String: Any] } + } + + struct Response: Sendable { + var status: Int + var body: String + + init(_ status: Int = 200, _ body: String = "") { + self.status = status + self.body = body + } + } + + let requests = LockIsolated<[Request]>([]) + let handler: @Sendable (Request) async throws -> Response + + init(handler: @escaping @Sendable (Request) async throws -> Response) { + self.handler = handler + } + + func recorded(_ method: HTTPRequest.Method, _ pathPrefix: String) -> [Request] { + requests.value.filter { $0.method == method && $0.path.hasPrefix(pathPrefix) } + } + + var asOpenAPITransport: ClientTransport { self } + + func send( + _ request: HTTPRequest, + body: HTTPBody?, + baseURL: URL, + operationID: String + ) async throws -> (HTTPResponse, HTTPBody?) { + var data = Data() + if let body { + data = try await Data(collecting: body, upTo: .max) + } + let recorded = Request( + method: request.method, + host: baseURL.host ?? "", + path: request.path ?? "", + headers: request.headerFields, + body: data + ) + requests.withValue { $0.append(recorded) } + + let response = try await handler(recorded) + var fields = HTTPFields() + fields[.contentType] = "application/json" + return ( + HTTPResponse(status: .init(code: response.status), headerFields: fields), + response.body.isEmpty ? nil : HTTPBody(response.body) + ) + } + + func makeWebSocket(url: URL) async throws -> WebSocketSession { + throw CancellationError() + } + + func withEphemeralClient( + perform: (any HTTPClientProtocol) async throws -> T + ) async throws -> T { + try await perform(self) + } +} From b48f5e874f5a64613ccdccc852952c0edd6edacc Mon Sep 17 00:00:00 2001 From: Ugo Mignon <56931733+TartanLeGrand@users.noreply.github.com> Date: Mon, 12 Oct 2026 12:31:20 +0200 Subject: [PATCH 5/7] xtool: add upload command xtool upload sends an ipa to App Store Connect with an API key, with --wait, --dry-run and --check (local checks only). --- Documentation/xtool.docc/Upload.md | 41 ++++++++ Documentation/xtool.docc/xtool.md | 1 + Sources/XToolSupport/UploadCommand.swift | 115 +++++++++++++++++++++++ Sources/XToolSupport/XTool.swift | 1 + 4 files changed, 158 insertions(+) create mode 100644 Documentation/xtool.docc/Upload.md create mode 100644 Sources/XToolSupport/UploadCommand.swift diff --git a/Documentation/xtool.docc/Upload.md b/Documentation/xtool.docc/Upload.md new file mode 100644 index 00000000..8a39fae2 --- /dev/null +++ b/Documentation/xtool.docc/Upload.md @@ -0,0 +1,41 @@ +# Upload to TestFlight + +Send a built `.ipa` to App Store Connect from the command line. + +## Overview + +`xtool upload` uploads an `.ipa` to App Store Connect, where it becomes a build that you can distribute with TestFlight or submit for review. It uses Apple's [Build Uploads](https://developer.apple.com/documentation/appstoreconnectapi/build-uploads) API, so it works the same on Linux, macOS and WSL, and doesn't need Xcode or Transporter. + +Before you start, you need + +- A paid Apple Developer Program membership. +- An [App Store Connect API key](https://developer.apple.com/documentation/appstoreconnectapi/creating-api-keys-for-app-store-connect-api) with the App Manager (or Admin) role. xtool must be logged in with it, which you do with `xtool auth login --mode key`. +- An app record in App Store Connect with the same bundle ID as your app. The API can't create it for you. + +## Upload a build + +```bash +xtool upload path/to/App.ipa --wait +``` + +xtool reads the bundle ID, version and build number from the `.ipa`, finds your app in App Store Connect, sends the file, and with `--wait` stays until Apple has processed the build. If Apple rejects it, the reasons Apple gives are printed. + +Each upload needs a build number (`CFBundleVersion`) that is higher than the previous uploads of the same version (`CFBundleShortVersionString`). + +If the app can't be found from its bundle ID, pass its App Store Connect ID with `--app-id`. + +## Check the .ipa first + +Processing takes a few minutes and Apple only reports problems at the end. `xtool upload` therefore checks the `.ipa` locally before it sends anything, and refuses to upload when it finds something that Apple is known to reject: + +- `Payload/` doesn't contain exactly one `.app`, or `Info.plist` lacks `CFBundleIdentifier`, `CFBundleShortVersionString` or `CFBundleVersion`. +- The icon doesn't come from a compiled asset catalog: `Assets.car` or `CFBundleIconName` is missing. +- `embedded.mobileprovision` is missing, isn't an App Store distribution profile, grants `get-task-allow`, or is for another bundle ID. + +It also warns when the `Info.plist` lacks the keys that Xcode adds (`DTXcode`, `DTXcodeBuild`, `DTSDKBuild`, `DTPlatformName` and so on). Apple may reject such a build with "Unsupported SDK or Xcode version". + +Use `--check` to only run these checks, which needs no login, and `--dry-run` to also look up the app without uploading. If you know better than the checks, `--skip-check` uploads anyway. + +> Important: +> +> A build from `xtool dev build` is signed for development, so it fails the checks above. `xtool upload` uploads an `.ipa` that is already ready for the App Store, for example one built on a Mac. diff --git a/Documentation/xtool.docc/xtool.md b/Documentation/xtool.docc/xtool.md index fea43522..62204413 100644 --- a/Documentation/xtool.docc/xtool.md +++ b/Documentation/xtool.docc/xtool.md @@ -32,3 +32,4 @@ xtool is a cross-platform (Linux/WSL/macOS) tool that replicates Xcode functiona - - +- diff --git a/Sources/XToolSupport/UploadCommand.swift b/Sources/XToolSupport/UploadCommand.swift new file mode 100644 index 00000000..421d977b --- /dev/null +++ b/Sources/XToolSupport/UploadCommand.swift @@ -0,0 +1,115 @@ +import Foundation +import XKit +import ArgumentParser + +struct UploadCommand: AsyncParsableCommand { + static let configuration = CommandConfiguration( + commandName: "upload", + abstract: "Upload an ipa file to App Store Connect (TestFlight)", + discussion: """ + This uses the App Store Connect API, so you need to be logged in with an API key \ + (`xtool auth login --mode key`). The app must already exist in App Store Connect. + """ + ) + + @Argument( + help: "The path to the ipa to upload", + completion: .file(extensions: ["ipa"]) + ) var path: String + + @Option( + name: .long, + help: "The App Store Connect ID of the app. By default it's looked up from the ipa's bundle ID." + ) var appID: String? + + @Flag( + help: "Wait for App Store Connect to finish processing the build, and report any problem it finds." + ) var wait = false + + @Flag( + help: "Only check the ipa locally and print what's wrong with it. Doesn't need to be logged in." + ) var check = false + + @Flag( + help: "Check the ipa and look up the app, but don't upload anything." + ) var dryRun = false + + @Flag( + help: "Upload even if the local checks found errors." + ) var skipCheck = false + + func run() async throws { + let ipa = URL(fileURLWithPath: path) + guard FileManager.default.fileExists(atPath: ipa.path) else { + throw Console.Error("\(path) does not exist.") + } + + let report = try await IPAInspector().inspect(ipa: ipa) + for finding in report.findings { + print(finding) + } + if check { + guard report.errors.isEmpty else { throw ExitCode.failure } + print("No errors found.") + return + } + if !report.errors.isEmpty && !skipCheck { + throw Console.Error( + "The ipa has problems that App Store Connect is likely to reject. " + + "Fix them, or pass --skip-check to upload anyway." + ) + } + guard let info = report.info else { + throw Console.Error("Could not read the bundle ID and version from the ipa.") + } + + guard case .appStoreConnect(let key) = try AuthToken.saved().authData() else { + throw Console.Error( + "This command requires an App Store Connect API key. Log in with `xtool auth login --mode key`." + ) + } + let uploader = BuildUploader(key: key) + let appID: String + if let explicit = self.appID { + appID = explicit + } else { + appID = try await uploader.resolveApp(bundleID: info.bundleID) + } + + print("\(info.bundleID) \(info.version) (\(info.build)), \(info.platform), app \(appID)") + if dryRun { + print("Dry run: nothing was uploaded.") + return + } + + let result = try await uploader.upload( + ipa: ipa, info: info, appID: appID, wait: wait, onEvent: Self.printEvent + ) + for message in result.warnings { + print("warning: \(message)") + } + for message in result.infos { + print("note: \(message)") + } + if wait { + print("Build \(info.build) was accepted by App Store Connect.") + } else { + print("Uploaded. App Store Connect is processing the build (state: \(result.state)). Use --wait to follow it.") + } + } + + private static func printEvent(_ event: BuildUploader.Event) { + switch event { + case .createdUpload(let id): + print("Created upload \(id)") + case .reservedFile(let parts): + print("Uploading \(parts) part\(parts == 1 ? "" : "s")...") + case .uploadedPart(let completed, let total): + print("Uploaded part \(completed)/\(total)") + case .committedFile: + print("Upload finished.") + case .processing(let state): + print("Processing: \(state)") + } + } +} diff --git a/Sources/XToolSupport/XTool.swift b/Sources/XToolSupport/XTool.swift index 2cec336e..ebc1fef2 100644 --- a/Sources/XToolSupport/XTool.swift +++ b/Sources/XToolSupport/XTool.swift @@ -30,6 +30,7 @@ private struct XToolCommand: AsyncParsableCommand { NewCommand.self, DevCommand.self, DSCommand.self, + UploadCommand.self, ] ), CommandGroup( From c3a4e391dee96f8e7919008619bf9e4fc9694339 Mon Sep 17 00:00:00 2001 From: Ugo Mignon <56931733+TartanLeGrand@users.noreply.github.com> Date: Mon, 12 Oct 2026 12:31:20 +0200 Subject: [PATCH 6/7] xkit: resolve the app with GET /v1/apps GET /v1/bundleIds/{id}/app does not exist (404 PATH_ERROR). Look the app up with the bundleId filter of /v1/apps instead. The request is made by hand through the same auth and error handling, because generating the operation would add ~10k lines for one lookup. --- .../XKit/AppStoreConnect/BuildUploader.swift | 67 +++++++++++++------ Tests/XToolTests/BuildUploaderTests.swift | 31 ++++----- 2 files changed, 62 insertions(+), 36 deletions(-) diff --git a/Sources/XKit/AppStoreConnect/BuildUploader.swift b/Sources/XKit/AppStoreConnect/BuildUploader.swift index 30104d9c..471134f6 100644 --- a/Sources/XKit/AppStoreConnect/BuildUploader.swift +++ b/Sources/XKit/AppStoreConnect/BuildUploader.swift @@ -81,6 +81,9 @@ public struct BuildUploader: Sendable { } private let client: DeveloperAPIClient + private let auth: DeveloperAPIASCAuthMiddleware + private let transport: any ClientTransport + private let baseURL: URL private let configuration: Configuration @Dependency(\.httpClient) private var httpClient @Dependency(\.continuousClock) private var clock @@ -88,16 +91,15 @@ public struct BuildUploader: Sendable { public init(key: ASCKey, configuration: Configuration = .init()) { @Dependency(\.httpClient) var httpClient self.configuration = configuration + self.auth = DeveloperAPIASCAuthMiddleware(key: key) + self.transport = httpClient.asOpenAPITransport + // swiftlint:disable:next force_try + self.baseURL = try! Servers.Server1.url() self.client = DeveloperAPIClient( - // swiftlint:disable:next force_try - serverURL: try! Servers.Server1.url(), + serverURL: baseURL, configuration: .init(dateTranscoder: LenientISO8601DateTranscoder()), - transport: httpClient.asOpenAPITransport, - middlewares: [ - DeveloperAPIASCAuthMiddleware(key: key), - HTTPStatusMiddleware(), - LoggingMiddleware(), - ] + transport: transport, + middlewares: [auth, HTTPStatusMiddleware(), LoggingMiddleware()] ) } @@ -105,22 +107,49 @@ public struct BuildUploader: Sendable { /// Finds the App Store Connect app ID for a bundle ID. public func resolveApp(bundleID: String) async throws -> String { - // the identifier filter is not an exact match - let bundleIDs = try await retrying { - try await client.bundleIdsGetCollection(query: .init( - filter_lbrack_identifier_rbrack_: [bundleID] - )).ok.body.json.data + // `GET /v1/apps` is not part of the generated client: its schemas (an app and everything + // that can be included with it) would add ~10k lines for one filtered lookup. So this request + // is made by hand, through the same authentication and error handling as the generated ones. + struct Apps: Decodable { + struct App: Decodable { + struct Attributes: Decodable { var bundleId: String? } + var id: String + var attributes: Attributes? + } + var data: [App] + } + let query = bundleID.addingPercentEncoding(withAllowedCharacters: .alphanumerics.union(.init(charactersIn: "-._"))) + ?? bundleID + let request = HTTPRequest( + method: .get, + scheme: "https", + authority: baseURL.host, + path: "/v1/apps?filter%5BbundleId%5D=\(query)&fields%5Bapps%5D=bundleId&limit=200" + ) + let data = try await retrying { + try await get(request) } - guard let resource = bundleIDs.first(where: { $0.attributes?.identifier == bundleID }) else { + let apps = try JSONDecoder().decode(Apps.self, from: data) + // the filter is not guaranteed to be an exact match + guard let app = apps.data.first(where: { $0.attributes?.bundleId == bundleID }) else { throw Error.appNotFound(bundleID: bundleID) } - do { - return try await retrying { - try await client.bundleIdsAppGetToOneRelated(path: .init(id: resource.id)).ok.body.json.data.id + return app.id + } + + private func get(_ request: HTTPRequest) async throws -> Data { + let transport = transport + let (_, body) = try await auth.intercept( + request, body: nil, baseURL: baseURL, operationID: "apps_getCollection" + ) { request, body, baseURL in + try await HTTPStatusMiddleware().intercept( + request, body: body, baseURL: baseURL, operationID: "apps_getCollection" + ) { request, body, baseURL in + try await transport.send(request, body: body, baseURL: baseURL, operationID: "apps_getCollection") } - } catch Error.http(status: 404, _) { - throw Error.appNotFound(bundleID: bundleID) } + guard let body else { return Data() } + return try await Data(collecting: body, upTo: 10 << 20) } // MARK: - Uploading diff --git a/Tests/XToolTests/BuildUploaderTests.swift b/Tests/XToolTests/BuildUploaderTests.swift index d5b81a70..8623c55c 100644 --- a/Tests/XToolTests/BuildUploaderTests.swift +++ b/Tests/XToolTests/BuildUploaderTests.swift @@ -371,30 +371,27 @@ private func happyPath( @Test func resolvesTheAppFromTheBundleID() async throws { let attempts = LockIsolated(0) let client = MockHTTPClient { request in - switch request.path.split(separator: "?").first.map(String.init) ?? "" { - case "/v1/bundleIds": - // the identifier filter is not an exact match - return .init(200, """ - {"data": [ - {"type": "bundleIds", "id": "B0", "attributes": {"identifier": "com.example.App.extension"}}, - {"type": "bundleIds", "id": "B1", "attributes": {"identifier": "com.example.App"}} - ], \(links)} - """) - case "/v1/bundleIds/B1/app": - // App Store Connect sometimes answers 404 for an app that does exist - return attempts.withValue { $0 += 1; return $0 } == 1 - ? .init(404, #"{"errors": [{"title": "There is no resource of type 'apps'"}]}"#) - : .init(200, #"{"data": {"type": "apps", "id": "APP1"}, \#(links)}"#) - default: - return .init(500) + guard request.path.hasPrefix("/v1/apps?") else { return .init(500) } + // App Store Connect sometimes answers 404 for an app that does exist + if attempts.withValue({ $0 += 1; return $0 }) == 1 { + return .init(404, #"{"errors": [{"title": "There is no resource of type 'apps'"}]}"#) } + return .init(200, """ + {"data": [ + {"type": "apps", "id": "111", "attributes": {"bundleId": "com.example.App.extension", "name": "Ext"}}, + {"type": "apps", "id": "222", "attributes": {"bundleId": "com.example.App", "name": "App"}} + ], \(links)} + """) } let appID = try await withMock(client) { try await BuildUploader(key: makeKey()).resolveApp(bundleID: "com.example.App") } - #expect(appID == "APP1") + #expect(appID == "222") #expect(attempts.value == 2) + let request = try #require(client.requests.value.last) + #expect(request.path.contains("filter%5BbundleId%5D=com.example.App")) + #expect(request.headers[.authorization]?.hasPrefix("Bearer ") == true) } @Test func reportsAnUnknownApp() async throws { From 46f71aa9f942524b6e5b70b88e582400dbeb2cea Mon Sep 17 00:00:00 2001 From: Ugo Mignon <56931733+TartanLeGrand@users.noreply.github.com> Date: Tue, 13 Oct 2026 15:41:20 +0200 Subject: [PATCH 7/7] xkit: refresh upload URLs before they expire Refresh a pre-signed URL when it expires within 60 seconds, since the local clock and the storage backend's may disagree. The current time is read from the date dependency so the margin can be tested. --- .../XKit/AppStoreConnect/BuildUploader.swift | 7 +++- Tests/XToolTests/BuildUploaderTests.swift | 35 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/Sources/XKit/AppStoreConnect/BuildUploader.swift b/Sources/XKit/AppStoreConnect/BuildUploader.swift index 471134f6..5e5463ac 100644 --- a/Sources/XKit/AppStoreConnect/BuildUploader.swift +++ b/Sources/XKit/AppStoreConnect/BuildUploader.swift @@ -80,6 +80,9 @@ public struct BuildUploader: Sendable { public var errorDescription: String? { description } } + /// How long before its expiration a pre-signed URL is considered stale. + static let urlRefreshMargin: TimeInterval = 60 + private let client: DeveloperAPIClient private let auth: DeveloperAPIASCAuthMiddleware private let transport: any ClientTransport @@ -87,6 +90,7 @@ public struct BuildUploader: Sendable { private let configuration: Configuration @Dependency(\.httpClient) private var httpClient @Dependency(\.continuousClock) private var clock + @Dependency(\.date) private var date public init(key: ASCKey, configuration: Configuration = .init()) { @Dependency(\.httpClient) var httpClient @@ -279,7 +283,8 @@ public struct BuildUploader: Sendable { var operation = operation try await retrying(isRetryable: Self.isRetryablePut) { // pre-signed URLs stop working at some point. The reservation can be read again to get new ones. - if let expiration = operation.expiration, expiration <= Date() { + // refresh a bit early: our clock and the storage backend's may disagree + if let expiration = operation.expiration, expiration <= date.now.addingTimeInterval(Self.urlRefreshMargin) { operation = try await refreshed(operation, fileID: fileID) } guard let url = operation.url.flatMap({ URL(string: $0) }) else { diff --git a/Tests/XToolTests/BuildUploaderTests.swift b/Tests/XToolTests/BuildUploaderTests.swift index 8623c55c..1677fce5 100644 --- a/Tests/XToolTests/BuildUploaderTests.swift +++ b/Tests/XToolTests/BuildUploaderTests.swift @@ -368,6 +368,41 @@ private func happyPath( #expect(client.recorded(.put, "/part1").count == 1) } + @Test func getsFreshURLsWhenAPartExpiresWithinTheMargin() async throws { + let ipa = try makeIPA() + defer { try? FileManager.default.removeItem(at: ipa) } + + // "now" is 2030-01-01T00:00:00Z: part 1 expires 30 s later (inside the margin), part 2 an hour later + let now = Date(timeIntervalSince1970: 1_893_456_000) + let soon = fileJSON(operations: [ + operation(part: 1, offset: 0, length: 4, expiration: "2030-01-01T00:00:30Z"), + operation(part: 2, offset: 4, length: 3, expiration: "2030-01-01T01:00:00Z"), + ]) + let client = MockHTTPClient { request in + switch (request.method, request.path) { + case (.post, "/v1/buildUploadFiles"): + return .init(201, soon) + case (.get, "/v1/buildUploadFiles/F1"): + return .init(200, twoParts) + default: + return try await happyPath().handler(request) + } + } + + let result = try await withDependencies { + $0.date = .constant(now) + } operation: { + try await withMock(client) { + try await BuildUploader(key: makeKey()).upload(ipa: ipa, info: info, appID: "APP1", wait: true) + } + } + #expect(result.state == "COMPLETE") + // only the part inside the margin triggers a refresh + #expect(client.recorded(.get, "/v1/buildUploadFiles/F1").count == 1) + #expect(client.recorded(.put, "/part1").count == 1) + #expect(client.recorded(.put, "/part2").count == 1) + } + @Test func resolvesTheAppFromTheBundleID() async throws { let attempts = LockIsolated(0) let client = MockHTTPClient { request in