mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
74 lines
2.9 KiB
Swift
74 lines
2.9 KiB
Swift
//
|
|
// Enrolment.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Enrolment: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Created reports whether this call enrolled the org (201) or found an existing enrolment (200). */
|
|
public var created: Bool?
|
|
/** GithubLogin is the linked forge account. */
|
|
public var githubLogin: String?
|
|
/** ID is the author record's server-minted handle, \"aut_\"-prefixed. */
|
|
public var id: String?
|
|
/** ShareBps is this author's royalty share in basis points of the spend their deployed work generates. */
|
|
public var shareBps: Int64?
|
|
/** Status is connected, approved or suspended. Only an approved author earns. */
|
|
public var status: String?
|
|
/** Verified reports whether any repository or owner claim has been proven yet. */
|
|
public var verified: Bool?
|
|
/** VerifyCode is this author's stable proof token — the value a repository's verify file must carry. */
|
|
public var verifyCode: String?
|
|
/** VerifyFile is the repo-root file the file method reads, on the default branch. */
|
|
public var verifyFile: String?
|
|
/** VerifySnippet is that file's exact contents, ready to commit. */
|
|
public var verifySnippet: String?
|
|
|
|
public init(created: Bool? = nil, githubLogin: String? = nil, id: String? = nil, shareBps: Int64? = nil, status: String? = nil, verified: Bool? = nil, verifyCode: String? = nil, verifyFile: String? = nil, verifySnippet: String? = nil) {
|
|
self.created = created
|
|
self.githubLogin = githubLogin
|
|
self.id = id
|
|
self.shareBps = shareBps
|
|
self.status = status
|
|
self.verified = verified
|
|
self.verifyCode = verifyCode
|
|
self.verifyFile = verifyFile
|
|
self.verifySnippet = verifySnippet
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case created
|
|
case githubLogin
|
|
case id
|
|
case shareBps
|
|
case status
|
|
case verified
|
|
case verifyCode
|
|
case verifyFile
|
|
case verifySnippet
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(created, forKey: .created)
|
|
try container.encodeIfPresent(githubLogin, forKey: .githubLogin)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(shareBps, forKey: .shareBps)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(verified, forKey: .verified)
|
|
try container.encodeIfPresent(verifyCode, forKey: .verifyCode)
|
|
try container.encodeIfPresent(verifyFile, forKey: .verifyFile)
|
|
try container.encodeIfPresent(verifySnippet, forKey: .verifySnippet)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension Enrolment: Identifiable {}
|