mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
56 lines
2.0 KiB
Swift
56 lines
2.0 KiB
Swift
//
|
|
// TrustAsk.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct TrustAsk: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Accept must be true when the centre states an NDA. The text accepted is recorded verbatim on the request, so a later edit to the NDA cannot rewrite what this party agreed to. */
|
|
public var accept: Bool?
|
|
/** Email is where the grant will be sent, and the ONLY address the resulting link admits. Required. */
|
|
public var email: String?
|
|
/** Item names one published item to ask for. Optional; omitting it asks for everything released on request. */
|
|
public var item: String?
|
|
/** Party is the company the asker is from. Optional, and recorded as stated. */
|
|
public var party: String?
|
|
/** Reason is why they want it. Optional, and recorded as stated — it is what the person deciding reads. */
|
|
public var reason: String?
|
|
/** Slug is the centre's public address, taken from the path. */
|
|
public var slug: String?
|
|
|
|
public init(accept: Bool? = nil, email: String? = nil, item: String? = nil, party: String? = nil, reason: String? = nil, slug: String? = nil) {
|
|
self.accept = accept
|
|
self.email = email
|
|
self.item = item
|
|
self.party = party
|
|
self.reason = reason
|
|
self.slug = slug
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case accept
|
|
case email
|
|
case item
|
|
case party
|
|
case reason
|
|
case slug
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(accept, forKey: .accept)
|
|
try container.encodeIfPresent(email, forKey: .email)
|
|
try container.encodeIfPresent(item, forKey: .item)
|
|
try container.encodeIfPresent(party, forKey: .party)
|
|
try container.encodeIfPresent(reason, forKey: .reason)
|
|
try container.encodeIfPresent(slug, forKey: .slug)
|
|
}
|
|
}
|
|
|