// Generated by swift-openapi-generator, do not modify. @_spi(Generated) import OpenAPIRuntime #if os(Linux) @preconcurrency import struct Foundation.URL @preconcurrency import struct Foundation.Data @preconcurrency import struct Foundation.Date #else import struct Foundation.URL import struct Foundation.Data import struct Foundation.Date #endif /// A type that performs HTTP operations defined by the OpenAPI document. internal protocol APIProtocol: Sendable { /// List all Todo items. /// /// - Remark: HTTP `GET /todo/`. /// - Remark: Generated from `#/paths//todo//get`. func get_sol_todo_sol_(_ input: Operations.get_sol_todo_sol_.Input) async throws -> Operations.get_sol_todo_sol_.Output /// Create a new incomplete Todo item. /// /// - Remark: HTTP `POST /todo/`. /// - Remark: Generated from `#/paths//todo//post`. func post_sol_todo_sol_(_ input: Operations.post_sol_todo_sol_.Input) async throws -> Operations.post_sol_todo_sol_.Output /// Get a single Todo item. /// /// - Remark: HTTP `GET /todo/{id}`. /// - Remark: Generated from `#/paths//todo/{id}/get`. func get_sol_todo_sol__lcub_id_rcub_(_ input: Operations.get_sol_todo_sol__lcub_id_rcub_.Input) async throws -> Operations.get_sol_todo_sol__lcub_id_rcub_.Output /// Delete a Todo item. /// /// - Remark: HTTP `DELETE /todo/{id}`. /// - Remark: Generated from `#/paths//todo/{id}/delete`. func delete_sol_todo_sol__lcub_id_rcub_(_ input: Operations.delete_sol_todo_sol__lcub_id_rcub_.Input) async throws -> Operations.delete_sol_todo_sol__lcub_id_rcub_.Output /// Complete a Todo. /// /// - Remark: HTTP `PUT /todo/{id}/complete`. /// - Remark: Generated from `#/paths//todo/{id}/complete/put`. func put_sol_todo_sol__lcub_id_rcub__sol_complete(_ input: Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Input) async throws -> Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Output /// creates an account /// /// register a new account to be used /// /// - Remark: HTTP `POST /todo/user/create`. /// - Remark: Generated from `#/paths//todo/user/create/post(create_user)`. func create_user(_ input: Operations.create_user.Input) async throws -> Operations.create_user.Output /// This documentation page. /// /// - Remark: HTTP `GET /docs/`. /// - Remark: Generated from `#/paths//docs//get`. func get_sol_docs_sol_(_ input: Operations.get_sol_docs_sol_.Input) async throws -> Operations.get_sol_docs_sol_.Output } /// Convenience overloads for operation inputs. extension APIProtocol { /// List all Todo items. /// /// - Remark: HTTP `GET /todo/`. /// - Remark: Generated from `#/paths//todo//get`. internal func get_sol_todo_sol_(headers: Operations.get_sol_todo_sol_.Input.Headers = .init()) async throws -> Operations.get_sol_todo_sol_.Output { try await get_sol_todo_sol_(Operations.get_sol_todo_sol_.Input(headers: headers)) } /// Create a new incomplete Todo item. /// /// - Remark: HTTP `POST /todo/`. /// - Remark: Generated from `#/paths//todo//post`. internal func post_sol_todo_sol_( headers: Operations.post_sol_todo_sol_.Input.Headers = .init(), body: Operations.post_sol_todo_sol_.Input.Body ) async throws -> Operations.post_sol_todo_sol_.Output { try await post_sol_todo_sol_(Operations.post_sol_todo_sol_.Input( headers: headers, body: body )) } /// Get a single Todo item. /// /// - Remark: HTTP `GET /todo/{id}`. /// - Remark: Generated from `#/paths//todo/{id}/get`. internal func get_sol_todo_sol__lcub_id_rcub_( path: Operations.get_sol_todo_sol__lcub_id_rcub_.Input.Path, headers: Operations.get_sol_todo_sol__lcub_id_rcub_.Input.Headers = .init() ) async throws -> Operations.get_sol_todo_sol__lcub_id_rcub_.Output { try await get_sol_todo_sol__lcub_id_rcub_(Operations.get_sol_todo_sol__lcub_id_rcub_.Input( path: path, headers: headers )) } /// Delete a Todo item. /// /// - Remark: HTTP `DELETE /todo/{id}`. /// - Remark: Generated from `#/paths//todo/{id}/delete`. internal func delete_sol_todo_sol__lcub_id_rcub_( path: Operations.delete_sol_todo_sol__lcub_id_rcub_.Input.Path, headers: Operations.delete_sol_todo_sol__lcub_id_rcub_.Input.Headers = .init() ) async throws -> Operations.delete_sol_todo_sol__lcub_id_rcub_.Output { try await delete_sol_todo_sol__lcub_id_rcub_(Operations.delete_sol_todo_sol__lcub_id_rcub_.Input( path: path, headers: headers )) } /// Complete a Todo. /// /// - Remark: HTTP `PUT /todo/{id}/complete`. /// - Remark: Generated from `#/paths//todo/{id}/complete/put`. internal func put_sol_todo_sol__lcub_id_rcub__sol_complete( path: Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Input.Path, headers: Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Input.Headers = .init() ) async throws -> Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Output { try await put_sol_todo_sol__lcub_id_rcub__sol_complete(Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Input( path: path, headers: headers )) } /// creates an account /// /// register a new account to be used /// /// - Remark: HTTP `POST /todo/user/create`. /// - Remark: Generated from `#/paths//todo/user/create/post(create_user)`. internal func create_user( headers: Operations.create_user.Input.Headers = .init(), body: Operations.create_user.Input.Body ) async throws -> Operations.create_user.Output { try await create_user(Operations.create_user.Input( headers: headers, body: body )) } /// This documentation page. /// /// - Remark: HTTP `GET /docs/`. /// - Remark: Generated from `#/paths//docs//get`. internal func get_sol_docs_sol_(headers: Operations.get_sol_docs_sol_.Input.Headers = .init()) async throws -> Operations.get_sol_docs_sol_.Output { try await get_sol_docs_sol_(Operations.get_sol_docs_sol_.Input(headers: headers)) } } /// Server URLs defined in the OpenAPI document. internal enum Servers {} /// Types generated from the components section of the OpenAPI document. internal enum Components { /// Types generated from the `#/components/schemas` section of the OpenAPI document. internal enum Schemas { /// - Remark: Generated from `#/components/schemas/Account`. internal struct Account: Codable, Hashable, Sendable { /// email address /// /// - Remark: Generated from `#/components/schemas/Account/email`. internal var email: Swift.String? /// internal uuid for the user /// /// - Remark: Generated from `#/components/schemas/Account/id`. internal var id: Swift.String /// phone number /// /// - Remark: Generated from `#/components/schemas/Account/phoneNumber`. internal struct phoneNumberPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/Account/phoneNumber/value1`. internal var value1: Components.Schemas.PhoneNumber? /// - Remark: Generated from `#/components/schemas/Account/phoneNumber/value2`. internal var value2: OpenAPIRuntime.OpenAPIValueContainer? /// Creates a new `phoneNumberPayload`. /// /// - Parameters: /// - value1: /// - value2: internal init( value1: Components.Schemas.PhoneNumber? = nil, value2: OpenAPIRuntime.OpenAPIValueContainer? = nil ) { self.value1 = value1 self.value2 = value2 } internal init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { value1 = try .init(from: decoder) } catch { errors.append(error) } do { value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ value1, value2 ], type: Self.self, codingPath: decoder.codingPath, errors: errors ) } internal func encode(to encoder: any Encoder) throws { try value1?.encode(to: encoder) try value2?.encode(to: encoder) } } /// phone number /// /// - Remark: Generated from `#/components/schemas/Account/phoneNumber`. internal var phoneNumber: Components.Schemas.Account.phoneNumberPayload? /// The code (string) for referrals /// /// - Remark: Generated from `#/components/schemas/Account/role`. internal var role: Components.Schemas.Role /// username as A-Za-z0-9 /// /// - Remark: Generated from `#/components/schemas/Account/username`. internal var username: Swift.String /// Creates a new `Account`. /// /// - Parameters: /// - email: email address /// - id: internal uuid for the user /// - phoneNumber: phone number /// - role: The code (string) for referrals /// - username: username as A-Za-z0-9 internal init( email: Swift.String? = nil, id: Swift.String, phoneNumber: Components.Schemas.Account.phoneNumberPayload? = nil, role: Components.Schemas.Role, username: Swift.String ) { self.email = email self.id = id self.phoneNumber = phoneNumber self.role = role self.username = username } internal enum CodingKeys: String, CodingKey { case email case id case phoneNumber case role case username } } /// A default error response for most API errors. /// /// - Remark: Generated from `#/components/schemas/AppError`. internal struct AppError: Codable, Hashable, Sendable { /// An error message. /// /// - Remark: Generated from `#/components/schemas/AppError/error`. internal var error: Swift.String /// Optional Additional error details. /// /// - Remark: Generated from `#/components/schemas/AppError/error_details`. internal var error_details: OpenAPIRuntime.OpenAPIValueContainer? /// A unique error ID. /// /// - Remark: Generated from `#/components/schemas/AppError/error_id`. internal var error_id: Swift.String /// Creates a new `AppError`. /// /// - Parameters: /// - error: An error message. /// - error_details: Optional Additional error details. /// - error_id: A unique error ID. internal init( error: Swift.String, error_details: OpenAPIRuntime.OpenAPIValueContainer? = nil, error_id: Swift.String ) { self.error = error self.error_details = error_details self.error_id = error_id } internal enum CodingKeys: String, CodingKey { case error case error_details case error_id } } /// - Remark: Generated from `#/components/schemas/ErrorPayload`. internal struct ErrorPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/ErrorPayload/message`. internal var message: Swift.String /// Creates a new `ErrorPayload`. /// /// - Parameters: /// - message: internal init(message: Swift.String) { self.message = message } internal enum CodingKeys: String, CodingKey { case message } } /// - Remark: Generated from `#/components/schemas/NewAccount`. internal struct NewAccount: Codable, Hashable, Sendable { /// email address /// /// - Remark: Generated from `#/components/schemas/NewAccount/email`. internal var email: Swift.String? /// phone number /// /// - Remark: Generated from `#/components/schemas/NewAccount/phoneNumber`. internal struct phoneNumberPayload: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/NewAccount/phoneNumber/value1`. internal var value1: Components.Schemas.PhoneNumber? /// - Remark: Generated from `#/components/schemas/NewAccount/phoneNumber/value2`. internal var value2: OpenAPIRuntime.OpenAPIValueContainer? /// Creates a new `phoneNumberPayload`. /// /// - Parameters: /// - value1: /// - value2: internal init( value1: Components.Schemas.PhoneNumber? = nil, value2: OpenAPIRuntime.OpenAPIValueContainer? = nil ) { self.value1 = value1 self.value2 = value2 } internal init(from decoder: any Decoder) throws { var errors: [any Error] = [] do { value1 = try .init(from: decoder) } catch { errors.append(error) } do { value2 = try .init(from: decoder) } catch { errors.append(error) } try Swift.DecodingError.verifyAtLeastOneSchemaIsNotNil( [ value1, value2 ], type: Self.self, codingPath: decoder.codingPath, errors: errors ) } internal func encode(to encoder: any Encoder) throws { try value1?.encode(to: encoder) try value2?.encode(to: encoder) } } /// phone number /// /// - Remark: Generated from `#/components/schemas/NewAccount/phoneNumber`. internal var phoneNumber: Components.Schemas.NewAccount.phoneNumberPayload? /// The code (string) for referrals /// /// - Remark: Generated from `#/components/schemas/NewAccount/role`. internal var role: Components.Schemas.Role /// username as A-Za-z0-9 /// /// - Remark: Generated from `#/components/schemas/NewAccount/username`. internal var username: Swift.String /// Creates a new `NewAccount`. /// /// - Parameters: /// - email: email address /// - phoneNumber: phone number /// - role: The code (string) for referrals /// - username: username as A-Za-z0-9 internal init( email: Swift.String? = nil, phoneNumber: Components.Schemas.NewAccount.phoneNumberPayload? = nil, role: Components.Schemas.Role, username: Swift.String ) { self.email = email self.phoneNumber = phoneNumber self.role = role self.username = username } internal enum CodingKeys: String, CodingKey { case email case phoneNumber case role case username } } /// New Todo details. /// /// - Remark: Generated from `#/components/schemas/NewTodo`. internal struct NewTodo: Codable, Hashable, Sendable { /// The description for the new Todo. /// /// - Remark: Generated from `#/components/schemas/NewTodo/description`. internal var description: Swift.String /// Creates a new `NewTodo`. /// /// - Parameters: /// - description: The description for the new Todo. internal init(description: Swift.String) { self.description = description } internal enum CodingKeys: String, CodingKey { case description } } /// - Remark: Generated from `#/components/schemas/PhoneNumber`. internal struct PhoneNumber: Codable, Hashable, Sendable { /// country code must contain only a set of digits 0-9 it should be formatted without leading zeros. for example: U.S.A. should be `1` without `+` and without `00` e.g. not `001` it should be assumed that the `+` would be added by the system /// /// - Remark: Generated from `#/components/schemas/PhoneNumber/countryCode`. internal var countryCode: Swift.String /// the number should be a set of digits "333555222" without parens or dashes. It should not contain the country code however it should be formatted such that combining a `+` countryCode number would result in a complete functional international phone number /// /// - Remark: Generated from `#/components/schemas/PhoneNumber/number`. internal var number: Swift.String /// Creates a new `PhoneNumber`. /// /// - Parameters: /// - countryCode: country code must contain only a set of digits 0-9 it should be formatted without leading zeros. for example: U.S.A. should be `1` without `+` and without `00` e.g. not `001` it should be assumed that the `+` would be added by the system /// - number: the number should be a set of digits "333555222" without parens or dashes. It should not contain the country code however it should be formatted such that combining a `+` countryCode number would result in a complete functional international phone number internal init( countryCode: Swift.String, number: Swift.String ) { self.countryCode = countryCode self.number = number } internal enum CodingKeys: String, CodingKey { case countryCode case number } } /// - Remark: Generated from `#/components/schemas/Role`. @frozen internal enum Role: String, Codable, Hashable, Sendable { case user = "user" case admin = "admin" } /// - Remark: Generated from `#/components/schemas/SelectTodo`. internal struct SelectTodo: Codable, Hashable, Sendable { /// The ID of the Todo. /// /// - Remark: Generated from `#/components/schemas/SelectTodo/id`. internal var id: Swift.String /// Creates a new `SelectTodo`. /// /// - Parameters: /// - id: The ID of the Todo. internal init(id: Swift.String) { self.id = id } internal enum CodingKeys: String, CodingKey { case id } } /// New Todo details. /// /// - Remark: Generated from `#/components/schemas/TodoCreated`. internal struct TodoCreated: Codable, Hashable, Sendable { /// The ID of the new Todo. /// /// - Remark: Generated from `#/components/schemas/TodoCreated/id`. internal var id: Swift.String /// Creates a new `TodoCreated`. /// /// - Parameters: /// - id: The ID of the new Todo. internal init(id: Swift.String) { self.id = id } internal enum CodingKeys: String, CodingKey { case id } } /// A single Todo item. /// /// - Remark: Generated from `#/components/schemas/TodoItem`. internal struct TodoItem: Codable, Hashable, Sendable { /// Whether the item was completed. /// /// - Remark: Generated from `#/components/schemas/TodoItem/complete`. internal var complete: Swift.Bool /// The description of the item. /// /// - Remark: Generated from `#/components/schemas/TodoItem/description`. internal var description: Swift.String /// - Remark: Generated from `#/components/schemas/TodoItem/id`. internal var id: Swift.String /// Creates a new `TodoItem`. /// /// - Parameters: /// - complete: Whether the item was completed. /// - description: The description of the item. /// - id: internal init( complete: Swift.Bool, description: Swift.String, id: Swift.String ) { self.complete = complete self.description = description self.id = id } internal enum CodingKeys: String, CodingKey { case complete case description case id } } /// - Remark: Generated from `#/components/schemas/TodoList`. internal struct TodoList: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/TodoList/todo_ids`. internal var todo_ids: [Swift.String] /// Creates a new `TodoList`. /// /// - Parameters: /// - todo_ids: internal init(todo_ids: [Swift.String]) { self.todo_ids = todo_ids } internal enum CodingKeys: String, CodingKey { case todo_ids } } } /// Types generated from the `#/components/parameters` section of the OpenAPI document. internal enum Parameters {} /// Types generated from the `#/components/requestBodies` section of the OpenAPI document. internal enum RequestBodies {} /// Types generated from the `#/components/responses` section of the OpenAPI document. internal enum Responses {} /// Types generated from the `#/components/headers` section of the OpenAPI document. internal enum Headers {} } /// API operations, with input and output types, generated from `#/paths` in the OpenAPI document. internal enum Operations { /// List all Todo items. /// /// - Remark: HTTP `GET /todo/`. /// - Remark: Generated from `#/paths//todo//get`. internal enum get_sol_todo_sol_ { internal static let id: Swift.String = "get/todo/" internal struct Input: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/GET/header`. internal struct Headers: Sendable, Hashable { internal var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: internal init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } internal var headers: Operations.get_sol_todo_sol_.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - headers: internal init(headers: Operations.get_sol_todo_sol_.Input.Headers = .init()) { self.headers = headers } } @frozen internal enum Output: Sendable, Hashable { internal struct Ok: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/GET/responses/200/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/GET/responses/200/content/application\/json`. case json(Components.Schemas.TodoList) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.TodoList { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.get_sol_todo_sol_.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.get_sol_todo_sol_.Output.Ok.Body) { self.body = body } } /// /// /// - Remark: Generated from `#/paths//todo//get/responses/200`. /// /// HTTP response code: `200 ok`. case ok(Operations.get_sol_todo_sol_.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. internal var ok: Operations.get_sol_todo_sol_.Output.Ok { get throws { switch self { case let .ok(response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "ok", response: self ) } } } internal struct Default: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/GET/responses/default/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/GET/responses/default/content/application\/json`. case json(Components.Schemas.AppError) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.AppError { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.get_sol_todo_sol_.Output.Default.Body /// Creates a new `Default`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.get_sol_todo_sol_.Output.Default.Body) { self.body = body } } /// /// /// - Remark: Generated from `#/paths//todo//get/responses/default`. /// /// HTTP response code: `default`. case `default`(statusCode: Swift.Int, Operations.get_sol_todo_sol_.Output.Default) /// The associated value of the enum case if `self` is `.`default``. /// /// - Throws: An error if `self` is not `.`default``. /// - SeeAlso: `.`default``. internal var `default`: Operations.get_sol_todo_sol_.Output.Default { get throws { switch self { case let .`default`(_, response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "default", response: self ) } } } } @frozen internal enum AcceptableContentType: AcceptableProtocol { case json case other(Swift.String) internal init?(rawValue: Swift.String) { switch rawValue.lowercased() { case "application/json": self = .json default: self = .other(rawValue) } } internal var rawValue: Swift.String { switch self { case let .other(string): return string case .json: return "application/json" } } internal static var allCases: [Self] { [ .json ] } } } /// Create a new incomplete Todo item. /// /// - Remark: HTTP `POST /todo/`. /// - Remark: Generated from `#/paths//todo//post`. internal enum post_sol_todo_sol_ { internal static let id: Swift.String = "post/todo/" internal struct Input: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/POST/header`. internal struct Headers: Sendable, Hashable { internal var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: internal init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } internal var headers: Operations.post_sol_todo_sol_.Input.Headers /// - Remark: Generated from `#/paths/todo/POST/requestBody`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/POST/requestBody/content/application\/json`. case json(Components.Schemas.NewTodo) } internal var body: Operations.post_sol_todo_sol_.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - headers: /// - body: internal init( headers: Operations.post_sol_todo_sol_.Input.Headers = .init(), body: Operations.post_sol_todo_sol_.Input.Body ) { self.headers = headers self.body = body } } @frozen internal enum Output: Sendable, Hashable { internal struct Created: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/POST/responses/201/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/POST/responses/201/content/application\/json`. case json(Components.Schemas.TodoCreated) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.TodoCreated { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.post_sol_todo_sol_.Output.Created.Body /// Creates a new `Created`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.post_sol_todo_sol_.Output.Created.Body) { self.body = body } } /// /// /// - Remark: Generated from `#/paths//todo//post/responses/201`. /// /// HTTP response code: `201 created`. case created(Operations.post_sol_todo_sol_.Output.Created) /// The associated value of the enum case if `self` is `.created`. /// /// - Throws: An error if `self` is not `.created`. /// - SeeAlso: `.created`. internal var created: Operations.post_sol_todo_sol_.Output.Created { get throws { switch self { case let .created(response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "created", response: self ) } } } internal struct Conflict: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/POST/responses/409/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/POST/responses/409/content/application\/json`. case json(Components.Schemas.AppError) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.AppError { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.post_sol_todo_sol_.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.post_sol_todo_sol_.Output.Conflict.Body) { self.body = body } } /// conflict with username, email, phone, or similar unique required data /// /// - Remark: Generated from `#/paths//todo//post/responses/409`. /// /// HTTP response code: `409 conflict`. case conflict(Operations.post_sol_todo_sol_.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. internal var conflict: Operations.post_sol_todo_sol_.Output.Conflict { get throws { switch self { case let .conflict(response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "conflict", response: self ) } } } internal struct Default: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/POST/responses/default/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/POST/responses/default/content/application\/json`. case json(Components.Schemas.AppError) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.AppError { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.post_sol_todo_sol_.Output.Default.Body /// Creates a new `Default`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.post_sol_todo_sol_.Output.Default.Body) { self.body = body } } /// /// /// - Remark: Generated from `#/paths//todo//post/responses/default`. /// /// HTTP response code: `default`. case `default`(statusCode: Swift.Int, Operations.post_sol_todo_sol_.Output.Default) /// The associated value of the enum case if `self` is `.`default``. /// /// - Throws: An error if `self` is not `.`default``. /// - SeeAlso: `.`default``. internal var `default`: Operations.post_sol_todo_sol_.Output.Default { get throws { switch self { case let .`default`(_, response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "default", response: self ) } } } } @frozen internal enum AcceptableContentType: AcceptableProtocol { case json case other(Swift.String) internal init?(rawValue: Swift.String) { switch rawValue.lowercased() { case "application/json": self = .json default: self = .other(rawValue) } } internal var rawValue: Swift.String { switch self { case let .other(string): return string case .json: return "application/json" } } internal static var allCases: [Self] { [ .json ] } } } /// Get a single Todo item. /// /// - Remark: HTTP `GET /todo/{id}`. /// - Remark: Generated from `#/paths//todo/{id}/get`. internal enum get_sol_todo_sol__lcub_id_rcub_ { internal static let id: Swift.String = "get/todo/{id}" internal struct Input: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/{id}/GET/path`. internal struct Path: Sendable, Hashable { /// The ID of the Todo. /// /// - Remark: Generated from `#/paths/todo/{id}/GET/path/id`. internal var id: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: The ID of the Todo. internal init(id: Swift.String) { self.id = id } } internal var path: Operations.get_sol_todo_sol__lcub_id_rcub_.Input.Path /// - Remark: Generated from `#/paths/todo/{id}/GET/header`. internal struct Headers: Sendable, Hashable { internal var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: internal init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } internal var headers: Operations.get_sol_todo_sol__lcub_id_rcub_.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: internal init( path: Operations.get_sol_todo_sol__lcub_id_rcub_.Input.Path, headers: Operations.get_sol_todo_sol__lcub_id_rcub_.Input.Headers = .init() ) { self.path = path self.headers = headers } } @frozen internal enum Output: Sendable, Hashable { internal struct Ok: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/{id}/GET/responses/200/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/{id}/GET/responses/200/content/application\/json`. case json(Components.Schemas.TodoItem) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.TodoItem { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.get_sol_todo_sol__lcub_id_rcub_.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.get_sol_todo_sol__lcub_id_rcub_.Output.Ok.Body) { self.body = body } } /// /// /// - Remark: Generated from `#/paths//todo/{id}/get/responses/200`. /// /// HTTP response code: `200 ok`. case ok(Operations.get_sol_todo_sol__lcub_id_rcub_.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. internal var ok: Operations.get_sol_todo_sol__lcub_id_rcub_.Output.Ok { get throws { switch self { case let .ok(response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "ok", response: self ) } } } internal struct NotFound: Sendable, Hashable { /// Creates a new `NotFound`. internal init() {} } /// todo was not found /// /// - Remark: Generated from `#/paths//todo/{id}/get/responses/404`. /// /// HTTP response code: `404 notFound`. case notFound(Operations.get_sol_todo_sol__lcub_id_rcub_.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. internal var notFound: Operations.get_sol_todo_sol__lcub_id_rcub_.Output.NotFound { get throws { switch self { case let .notFound(response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "notFound", response: self ) } } } internal struct Default: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/{id}/GET/responses/default/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/{id}/GET/responses/default/content/application\/json`. case json(Components.Schemas.AppError) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.AppError { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.get_sol_todo_sol__lcub_id_rcub_.Output.Default.Body /// Creates a new `Default`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.get_sol_todo_sol__lcub_id_rcub_.Output.Default.Body) { self.body = body } } /// /// /// - Remark: Generated from `#/paths//todo/{id}/get/responses/default`. /// /// HTTP response code: `default`. case `default`(statusCode: Swift.Int, Operations.get_sol_todo_sol__lcub_id_rcub_.Output.Default) /// The associated value of the enum case if `self` is `.`default``. /// /// - Throws: An error if `self` is not `.`default``. /// - SeeAlso: `.`default``. internal var `default`: Operations.get_sol_todo_sol__lcub_id_rcub_.Output.Default { get throws { switch self { case let .`default`(_, response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "default", response: self ) } } } } @frozen internal enum AcceptableContentType: AcceptableProtocol { case json case other(Swift.String) internal init?(rawValue: Swift.String) { switch rawValue.lowercased() { case "application/json": self = .json default: self = .other(rawValue) } } internal var rawValue: Swift.String { switch self { case let .other(string): return string case .json: return "application/json" } } internal static var allCases: [Self] { [ .json ] } } } /// Delete a Todo item. /// /// - Remark: HTTP `DELETE /todo/{id}`. /// - Remark: Generated from `#/paths//todo/{id}/delete`. internal enum delete_sol_todo_sol__lcub_id_rcub_ { internal static let id: Swift.String = "delete/todo/{id}" internal struct Input: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/{id}/DELETE/path`. internal struct Path: Sendable, Hashable { /// The ID of the Todo. /// /// - Remark: Generated from `#/paths/todo/{id}/DELETE/path/id`. internal var id: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: The ID of the Todo. internal init(id: Swift.String) { self.id = id } } internal var path: Operations.delete_sol_todo_sol__lcub_id_rcub_.Input.Path /// - Remark: Generated from `#/paths/todo/{id}/DELETE/header`. internal struct Headers: Sendable, Hashable { internal var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: internal init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } internal var headers: Operations.delete_sol_todo_sol__lcub_id_rcub_.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: internal init( path: Operations.delete_sol_todo_sol__lcub_id_rcub_.Input.Path, headers: Operations.delete_sol_todo_sol__lcub_id_rcub_.Input.Headers = .init() ) { self.path = path self.headers = headers } } @frozen internal enum Output: Sendable, Hashable { internal struct NoContent: Sendable, Hashable { /// Creates a new `NoContent`. internal init() {} } /// The Todo has been deleted. /// /// - Remark: Generated from `#/paths//todo/{id}/delete/responses/204`. /// /// HTTP response code: `204 noContent`. case noContent(Operations.delete_sol_todo_sol__lcub_id_rcub_.Output.NoContent) /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. /// - SeeAlso: `.noContent`. internal var noContent: Operations.delete_sol_todo_sol__lcub_id_rcub_.Output.NoContent { get throws { switch self { case let .noContent(response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "noContent", response: self ) } } } internal struct NotFound: Sendable, Hashable { /// Creates a new `NotFound`. internal init() {} } /// The todo was not found /// /// - Remark: Generated from `#/paths//todo/{id}/delete/responses/404`. /// /// HTTP response code: `404 notFound`. case notFound(Operations.delete_sol_todo_sol__lcub_id_rcub_.Output.NotFound) /// The associated value of the enum case if `self` is `.notFound`. /// /// - Throws: An error if `self` is not `.notFound`. /// - SeeAlso: `.notFound`. internal var notFound: Operations.delete_sol_todo_sol__lcub_id_rcub_.Output.NotFound { get throws { switch self { case let .notFound(response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "notFound", response: self ) } } } internal struct Default: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/{id}/DELETE/responses/default/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/{id}/DELETE/responses/default/content/application\/json`. case json(Components.Schemas.AppError) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.AppError { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.delete_sol_todo_sol__lcub_id_rcub_.Output.Default.Body /// Creates a new `Default`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.delete_sol_todo_sol__lcub_id_rcub_.Output.Default.Body) { self.body = body } } /// /// /// - Remark: Generated from `#/paths//todo/{id}/delete/responses/default`. /// /// HTTP response code: `default`. case `default`(statusCode: Swift.Int, Operations.delete_sol_todo_sol__lcub_id_rcub_.Output.Default) /// The associated value of the enum case if `self` is `.`default``. /// /// - Throws: An error if `self` is not `.`default``. /// - SeeAlso: `.`default``. internal var `default`: Operations.delete_sol_todo_sol__lcub_id_rcub_.Output.Default { get throws { switch self { case let .`default`(_, response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "default", response: self ) } } } } @frozen internal enum AcceptableContentType: AcceptableProtocol { case json case other(Swift.String) internal init?(rawValue: Swift.String) { switch rawValue.lowercased() { case "application/json": self = .json default: self = .other(rawValue) } } internal var rawValue: Swift.String { switch self { case let .other(string): return string case .json: return "application/json" } } internal static var allCases: [Self] { [ .json ] } } } /// Complete a Todo. /// /// - Remark: HTTP `PUT /todo/{id}/complete`. /// - Remark: Generated from `#/paths//todo/{id}/complete/put`. internal enum put_sol_todo_sol__lcub_id_rcub__sol_complete { internal static let id: Swift.String = "put/todo/{id}/complete" internal struct Input: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/{id}/complete/PUT/path`. internal struct Path: Sendable, Hashable { /// The ID of the Todo. /// /// - Remark: Generated from `#/paths/todo/{id}/complete/PUT/path/id`. internal var id: Swift.String /// Creates a new `Path`. /// /// - Parameters: /// - id: The ID of the Todo. internal init(id: Swift.String) { self.id = id } } internal var path: Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Input.Path /// - Remark: Generated from `#/paths/todo/{id}/complete/PUT/header`. internal struct Headers: Sendable, Hashable { internal var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: internal init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } internal var headers: Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - path: /// - headers: internal init( path: Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Input.Path, headers: Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Input.Headers = .init() ) { self.path = path self.headers = headers } } @frozen internal enum Output: Sendable, Hashable { internal struct NoContent: Sendable, Hashable { /// Creates a new `NoContent`. internal init() {} } /// no content /// /// - Remark: Generated from `#/paths//todo/{id}/complete/put/responses/204`. /// /// HTTP response code: `204 noContent`. case noContent(Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Output.NoContent) /// The associated value of the enum case if `self` is `.noContent`. /// /// - Throws: An error if `self` is not `.noContent`. /// - SeeAlso: `.noContent`. internal var noContent: Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Output.NoContent { get throws { switch self { case let .noContent(response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "noContent", response: self ) } } } internal struct Default: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/{id}/complete/PUT/responses/default/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/{id}/complete/PUT/responses/default/content/application\/json`. case json(Components.Schemas.AppError) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.AppError { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Output.Default.Body /// Creates a new `Default`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Output.Default.Body) { self.body = body } } /// /// /// - Remark: Generated from `#/paths//todo/{id}/complete/put/responses/default`. /// /// HTTP response code: `default`. case `default`(statusCode: Swift.Int, Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Output.Default) /// The associated value of the enum case if `self` is `.`default``. /// /// - Throws: An error if `self` is not `.`default``. /// - SeeAlso: `.`default``. internal var `default`: Operations.put_sol_todo_sol__lcub_id_rcub__sol_complete.Output.Default { get throws { switch self { case let .`default`(_, response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "default", response: self ) } } } } @frozen internal enum AcceptableContentType: AcceptableProtocol { case json case other(Swift.String) internal init?(rawValue: Swift.String) { switch rawValue.lowercased() { case "application/json": self = .json default: self = .other(rawValue) } } internal var rawValue: Swift.String { switch self { case let .other(string): return string case .json: return "application/json" } } internal static var allCases: [Self] { [ .json ] } } } /// creates an account /// /// register a new account to be used /// /// - Remark: HTTP `POST /todo/user/create`. /// - Remark: Generated from `#/paths//todo/user/create/post(create_user)`. internal enum create_user { internal static let id: Swift.String = "create_user" internal struct Input: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/user/create/POST/header`. internal struct Headers: Sendable, Hashable { internal var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: internal init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } internal var headers: Operations.create_user.Input.Headers /// - Remark: Generated from `#/paths/todo/user/create/POST/requestBody`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/user/create/POST/requestBody/content/application\/json`. case json(Components.Schemas.NewAccount) } internal var body: Operations.create_user.Input.Body /// Creates a new `Input`. /// /// - Parameters: /// - headers: /// - body: internal init( headers: Operations.create_user.Input.Headers = .init(), body: Operations.create_user.Input.Body ) { self.headers = headers self.body = body } } @frozen internal enum Output: Sendable, Hashable { internal struct Created: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/user/create/POST/responses/201/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/user/create/POST/responses/201/content/application\/json`. case json(Components.Schemas.Account) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.Account { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.create_user.Output.Created.Body /// Creates a new `Created`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.create_user.Output.Created.Body) { self.body = body } } /// /// /// - Remark: Generated from `#/paths//todo/user/create/post(create_user)/responses/201`. /// /// HTTP response code: `201 created`. case created(Operations.create_user.Output.Created) /// The associated value of the enum case if `self` is `.created`. /// /// - Throws: An error if `self` is not `.created`. /// - SeeAlso: `.created`. internal var created: Operations.create_user.Output.Created { get throws { switch self { case let .created(response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "created", response: self ) } } } internal struct BadRequest: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/user/create/POST/responses/400/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/user/create/POST/responses/400/content/application\/json`. case json(Components.Schemas.ErrorPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.ErrorPayload { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.create_user.Output.BadRequest.Body /// Creates a new `BadRequest`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.create_user.Output.BadRequest.Body) { self.body = body } } /// bad request /// /// - Remark: Generated from `#/paths//todo/user/create/post(create_user)/responses/400`. /// /// HTTP response code: `400 badRequest`. case badRequest(Operations.create_user.Output.BadRequest) /// The associated value of the enum case if `self` is `.badRequest`. /// /// - Throws: An error if `self` is not `.badRequest`. /// - SeeAlso: `.badRequest`. internal var badRequest: Operations.create_user.Output.BadRequest { get throws { switch self { case let .badRequest(response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "badRequest", response: self ) } } } internal struct Conflict: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/user/create/POST/responses/409/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/user/create/POST/responses/409/content/application\/json`. case json(Components.Schemas.ErrorPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.ErrorPayload { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.create_user.Output.Conflict.Body /// Creates a new `Conflict`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.create_user.Output.Conflict.Body) { self.body = body } } /// conflict with username, email, phone, or similar unique required data /// /// - Remark: Generated from `#/paths//todo/user/create/post(create_user)/responses/409`. /// /// HTTP response code: `409 conflict`. case conflict(Operations.create_user.Output.Conflict) /// The associated value of the enum case if `self` is `.conflict`. /// /// - Throws: An error if `self` is not `.conflict`. /// - SeeAlso: `.conflict`. internal var conflict: Operations.create_user.Output.Conflict { get throws { switch self { case let .conflict(response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "conflict", response: self ) } } } internal struct InternalServerError: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/user/create/POST/responses/500/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/user/create/POST/responses/500/content/application\/json`. case json(Components.Schemas.ErrorPayload) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.ErrorPayload { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.create_user.Output.InternalServerError.Body /// Creates a new `InternalServerError`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.create_user.Output.InternalServerError.Body) { self.body = body } } /// parse error or missing data /// /// - Remark: Generated from `#/paths//todo/user/create/post(create_user)/responses/500`. /// /// HTTP response code: `500 internalServerError`. case internalServerError(Operations.create_user.Output.InternalServerError) /// The associated value of the enum case if `self` is `.internalServerError`. /// /// - Throws: An error if `self` is not `.internalServerError`. /// - SeeAlso: `.internalServerError`. internal var internalServerError: Operations.create_user.Output.InternalServerError { get throws { switch self { case let .internalServerError(response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "internalServerError", response: self ) } } } internal struct Default: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/user/create/POST/responses/default/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/todo/user/create/POST/responses/default/content/application\/json`. case json(Components.Schemas.AppError) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.AppError { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.create_user.Output.Default.Body /// Creates a new `Default`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.create_user.Output.Default.Body) { self.body = body } } /// /// /// - Remark: Generated from `#/paths//todo/user/create/post(create_user)/responses/default`. /// /// HTTP response code: `default`. case `default`(statusCode: Swift.Int, Operations.create_user.Output.Default) /// The associated value of the enum case if `self` is `.`default``. /// /// - Throws: An error if `self` is not `.`default``. /// - SeeAlso: `.`default``. internal var `default`: Operations.create_user.Output.Default { get throws { switch self { case let .`default`(_, response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "default", response: self ) } } } } @frozen internal enum AcceptableContentType: AcceptableProtocol { case json case other(Swift.String) internal init?(rawValue: Swift.String) { switch rawValue.lowercased() { case "application/json": self = .json default: self = .other(rawValue) } } internal var rawValue: Swift.String { switch self { case let .other(string): return string case .json: return "application/json" } } internal static var allCases: [Self] { [ .json ] } } } /// This documentation page. /// /// - Remark: HTTP `GET /docs/`. /// - Remark: Generated from `#/paths//docs//get`. internal enum get_sol_docs_sol_ { internal static let id: Swift.String = "get/docs/" internal struct Input: Sendable, Hashable { /// - Remark: Generated from `#/paths/docs/GET/header`. internal struct Headers: Sendable, Hashable { internal var accept: [OpenAPIRuntime.AcceptHeaderContentType] /// Creates a new `Headers`. /// /// - Parameters: /// - accept: internal init(accept: [OpenAPIRuntime.AcceptHeaderContentType] = .defaultValues()) { self.accept = accept } } internal var headers: Operations.get_sol_docs_sol_.Input.Headers /// Creates a new `Input`. /// /// - Parameters: /// - headers: internal init(headers: Operations.get_sol_docs_sol_.Input.Headers = .init()) { self.headers = headers } } @frozen internal enum Output: Sendable, Hashable { internal struct Ok: Sendable, Hashable { /// - Remark: Generated from `#/paths/docs/GET/responses/200/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/docs/GET/responses/200/content/text\/html`. case html(OpenAPIRuntime.HTTPBody) /// The associated value of the enum case if `self` is `.html`. /// /// - Throws: An error if `self` is not `.html`. /// - SeeAlso: `.html`. internal var html: OpenAPIRuntime.HTTPBody { get throws { switch self { case let .html(body): return body } } } } /// Received HTTP response body internal var body: Operations.get_sol_docs_sol_.Output.Ok.Body /// Creates a new `Ok`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.get_sol_docs_sol_.Output.Ok.Body) { self.body = body } } /// HTML content /// /// - Remark: Generated from `#/paths//docs//get/responses/200`. /// /// HTTP response code: `200 ok`. case ok(Operations.get_sol_docs_sol_.Output.Ok) /// The associated value of the enum case if `self` is `.ok`. /// /// - Throws: An error if `self` is not `.ok`. /// - SeeAlso: `.ok`. internal var ok: Operations.get_sol_docs_sol_.Output.Ok { get throws { switch self { case let .ok(response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "ok", response: self ) } } } internal struct Default: Sendable, Hashable { /// - Remark: Generated from `#/paths/docs/GET/responses/default/content`. @frozen internal enum Body: Sendable, Hashable { /// - Remark: Generated from `#/paths/docs/GET/responses/default/content/application\/json`. case json(Components.Schemas.AppError) /// The associated value of the enum case if `self` is `.json`. /// /// - Throws: An error if `self` is not `.json`. /// - SeeAlso: `.json`. internal var json: Components.Schemas.AppError { get throws { switch self { case let .json(body): return body } } } } /// Received HTTP response body internal var body: Operations.get_sol_docs_sol_.Output.Default.Body /// Creates a new `Default`. /// /// - Parameters: /// - body: Received HTTP response body internal init(body: Operations.get_sol_docs_sol_.Output.Default.Body) { self.body = body } } /// /// /// - Remark: Generated from `#/paths//docs//get/responses/default`. /// /// HTTP response code: `default`. case `default`(statusCode: Swift.Int, Operations.get_sol_docs_sol_.Output.Default) /// The associated value of the enum case if `self` is `.`default``. /// /// - Throws: An error if `self` is not `.`default``. /// - SeeAlso: `.`default``. internal var `default`: Operations.get_sol_docs_sol_.Output.Default { get throws { switch self { case let .`default`(_, response): return response default: try throwUnexpectedResponseStatus( expectedStatus: "default", response: self ) } } } } @frozen internal enum AcceptableContentType: AcceptableProtocol { case html case json case other(Swift.String) internal init?(rawValue: Swift.String) { switch rawValue.lowercased() { case "text/html": self = .html case "application/json": self = .json default: self = .other(rawValue) } } internal var rawValue: Swift.String { switch self { case let .other(string): return string case .html: return "text/html" case .json: return "application/json" } } internal static var allCases: [Self] { [ .html, .json ] } } } }