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
1.8 KiB
Swift
56 lines
1.8 KiB
Swift
//
|
|
// RegistryStatus.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct RegistryStatus: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Host is the OCI registry host clients push to and pull from. */
|
|
public var host: String?
|
|
/** Oci is true when the OCI registry answered its /v2/ probe. */
|
|
public var oci: Bool?
|
|
/** Pkg is true when the npm registry answered its ping. */
|
|
public var pkg: Bool?
|
|
/** PkgHost is the npm registry host. */
|
|
public var pkgHost: String?
|
|
/** Realm is the token endpoint the OCI registry's challenge advertises, present only when the registry is reachable and auth-gated. */
|
|
public var realm: String?
|
|
/** Service is the token service name from the same challenge. */
|
|
public var service: String?
|
|
|
|
public init(host: String? = nil, oci: Bool? = nil, pkg: Bool? = nil, pkgHost: String? = nil, realm: String? = nil, service: String? = nil) {
|
|
self.host = host
|
|
self.oci = oci
|
|
self.pkg = pkg
|
|
self.pkgHost = pkgHost
|
|
self.realm = realm
|
|
self.service = service
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case host
|
|
case oci
|
|
case pkg
|
|
case pkgHost
|
|
case realm
|
|
case service
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(host, forKey: .host)
|
|
try container.encodeIfPresent(oci, forKey: .oci)
|
|
try container.encodeIfPresent(pkg, forKey: .pkg)
|
|
try container.encodeIfPresent(pkgHost, forKey: .pkgHost)
|
|
try container.encodeIfPresent(realm, forKey: .realm)
|
|
try container.encodeIfPresent(service, forKey: .service)
|
|
}
|
|
}
|
|
|