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.
51 lines
2.0 KiB
Swift
51 lines
2.0 KiB
Swift
//
|
|
// GithubForkOut.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct GithubForkOut: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** CloneURL is the fork's https git remote. GitHub populates a new fork in the background, so a clone issued the moment this answers can still find it empty. */
|
|
public var cloneUrl: String?
|
|
/** DefaultBranch is the branch the fork checks out, inherited from upstream. */
|
|
public var defaultBranch: String?
|
|
/** Existing reports that the fork was already there. GitHub answers 202 either way, so without this a caller cannot tell \"made you one\" from \"you had one\". */
|
|
public var existing: Bool?
|
|
/** FullName is the fork's \"owner/repo\". The owner is the account it landed in — the request's org, or the installation's own account when none was named. */
|
|
public var fullName: String?
|
|
/** HTMLURL is the fork's page on github.com. */
|
|
public var htmlUrl: String?
|
|
|
|
public init(cloneUrl: String? = nil, defaultBranch: String? = nil, existing: Bool? = nil, fullName: String? = nil, htmlUrl: String? = nil) {
|
|
self.cloneUrl = cloneUrl
|
|
self.defaultBranch = defaultBranch
|
|
self.existing = existing
|
|
self.fullName = fullName
|
|
self.htmlUrl = htmlUrl
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case cloneUrl = "clone_url"
|
|
case defaultBranch = "default_branch"
|
|
case existing
|
|
case fullName = "full_name"
|
|
case htmlUrl = "html_url"
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(cloneUrl, forKey: .cloneUrl)
|
|
try container.encodeIfPresent(defaultBranch, forKey: .defaultBranch)
|
|
try container.encodeIfPresent(existing, forKey: .existing)
|
|
try container.encodeIfPresent(fullName, forKey: .fullName)
|
|
try container.encodeIfPresent(htmlUrl, forKey: .htmlUrl)
|
|
}
|
|
}
|
|
|