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.
41 lines
1.3 KiB
Swift
41 lines
1.3 KiB
Swift
//
|
|
// MirrorReq.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct MirrorReq: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Name is the local repo to mirror into, from the :name path segment. It is CREATED on first use. */
|
|
public var name: String?
|
|
/** Project is the sub-scope to land the repo in; empty uses the caller's own, exactly as a create would. */
|
|
public var project: String?
|
|
/** Source is the http(s) git URL to fetch from. The host is SSRF-guarded, and a credential is sent only if we hold one NAMED FOR that host — so a tenant-supplied URL to anywhere else fetches anonymously. */
|
|
public var source: String?
|
|
|
|
public init(name: String? = nil, project: String? = nil, source: String? = nil) {
|
|
self.name = name
|
|
self.project = project
|
|
self.source = source
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case name
|
|
case project
|
|
case source
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(project, forKey: .project)
|
|
try container.encodeIfPresent(source, forKey: .source)
|
|
}
|
|
}
|
|
|