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.5 KiB
Swift
41 lines
1.5 KiB
Swift
//
|
|
// GitSource.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct GitSource: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Branch is the branch a push-to-deploy build tracks, `main` when the create named none — a push to any other branch, and every tag push, builds nothing here. A deploy may name a commit instead, for that deploy alone. */
|
|
public var branch: String?
|
|
/** Provider is derived from the URL — github, gitlab, bitbucket, or `git` for anything else. It is a label for display; no behaviour keys on it. */
|
|
public var provider: String?
|
|
/** URL is the clone URL a git app builds from, stored as sent once the build path's allowlist accepted it (validateRepoURL). It is also what a landed push is MATCHED against, so a push to any other repo never builds this app. */
|
|
public var url: String?
|
|
|
|
public init(branch: String? = nil, provider: String? = nil, url: String? = nil) {
|
|
self.branch = branch
|
|
self.provider = provider
|
|
self.url = url
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case branch
|
|
case provider
|
|
case url
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(branch, forKey: .branch)
|
|
try container.encodeIfPresent(provider, forKey: .provider)
|
|
try container.encodeIfPresent(url, forKey: .url)
|
|
}
|
|
}
|
|
|