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.
56 lines
3.0 KiB
Swift
56 lines
3.0 KiB
Swift
//
|
|
// OrgView.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct OrgView: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** BadgeMarkdown is the ready-to-paste README snippet, DERIVED for each response from this deployment's badge host and never stored — here it deep-links the OWNER's template import rather than one repository's. */
|
|
public var badgeMarkdown: String?
|
|
/** CreatedAt is unix seconds when the owner claim was first recorded — equal to verifiedAt on the first proof, then fixed while verifiedAt moves. */
|
|
public var createdAt: Int64?
|
|
/** Method is HOW the owner was proven, always against its \".github\" control repository: \"oauth\" — an IAM-linked forge token showed admin or push on it; or \"file\" — a hanzo.json on its default branch carried this author's verify code. The \"maintainer\" shortcut is a per-repository attribution and never appears here. Omitted on a row written before the method was recorded. */
|
|
public var method: String?
|
|
/** OwnerURL is the claim key in canonical form — lowercased \"host/owner\" with NO repository segment, host ∈ {github.com, gitlab.com}. It covers every repository under that owner, so code with no claim of its own still earns; a per-repository claim outranks it. UNIQUE across every author: first proven claim wins. */
|
|
public var ownerUrl: String?
|
|
/** Verified reports that ownership of the WHOLE owner was proven — against that owner's \".github\" control repository, which is exactly as strong as a per-repository claim. Only a proven claim is written, so every row returned here is true. */
|
|
public var verified: Bool?
|
|
/** VerifiedAt is unix seconds of the most recent successful proof of the owner; re-verifying refreshes it, and the method beside it, in place. */
|
|
public var verifiedAt: Int64?
|
|
|
|
public init(badgeMarkdown: String? = nil, createdAt: Int64? = nil, method: String? = nil, ownerUrl: String? = nil, verified: Bool? = nil, verifiedAt: Int64? = nil) {
|
|
self.badgeMarkdown = badgeMarkdown
|
|
self.createdAt = createdAt
|
|
self.method = method
|
|
self.ownerUrl = ownerUrl
|
|
self.verified = verified
|
|
self.verifiedAt = verifiedAt
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case badgeMarkdown
|
|
case createdAt
|
|
case method
|
|
case ownerUrl
|
|
case verified
|
|
case verifiedAt
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(badgeMarkdown, forKey: .badgeMarkdown)
|
|
try container.encodeIfPresent(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(method, forKey: .method)
|
|
try container.encodeIfPresent(ownerUrl, forKey: .ownerUrl)
|
|
try container.encodeIfPresent(verified, forKey: .verified)
|
|
try container.encodeIfPresent(verifiedAt, forKey: .verifiedAt)
|
|
}
|
|
}
|
|
|