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.
99 lines
4.1 KiB
Swift
99 lines
4.1 KiB
Swift
//
|
|
// RepoView.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct RepoView: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Branches are the repo's branch names. Read live, so the detail view carries them and a list row does not. */
|
|
public var branches: [String]?
|
|
/** CloneURL is the HTTPS smart-HTTP remote `git clone` takes. */
|
|
public var cloneUrl: String?
|
|
/** CreatedAt is RFC 3339 UTC. */
|
|
public var createdAt: String?
|
|
/** DefaultBranch is where HEAD points on a fresh repo (\"main\"). */
|
|
public var defaultBranch: String?
|
|
/** Description is the caller-supplied blurb (max 4KiB). */
|
|
public var description: String?
|
|
/** Head is the resolved HEAD commit, empty on an empty repo. */
|
|
public var head: String?
|
|
/** ID is the repo's stable, prefixed identifier (\"repo_\" + 128 random bits). */
|
|
public var id: String?
|
|
/** Name is the org-unique handle, and the last path segment of both URLs below. */
|
|
public var name: String?
|
|
/** Org owns the repo — the gateway-minted X-Org-Id, and the isolation key. */
|
|
public var org: String?
|
|
/** Project is the optional sub-scope the repo lives in; absent for the org's default scope. */
|
|
public var project: String?
|
|
/** Public grants ANONYMOUS read (fetch) only; push and the whole control plane stay org-authed. */
|
|
public var _public: Bool?
|
|
/** SizeBytes is the repo's measured on-disk size, re-measured on create, after each push, and after a gc. This is the number billing meters. */
|
|
public var sizeBytes: Int64?
|
|
/** SSHURL is the scp-style SSH remote (git@host:org/repo.git). */
|
|
public var sshUrl: String?
|
|
/** UpdatedAt is RFC 3339 UTC, empty until the first write. */
|
|
public var updatedAt: String?
|
|
|
|
public init(branches: [String]? = nil, cloneUrl: String? = nil, createdAt: String? = nil, defaultBranch: String? = nil, description: String? = nil, head: String? = nil, id: String? = nil, name: String? = nil, org: String? = nil, project: String? = nil, _public: Bool? = nil, sizeBytes: Int64? = nil, sshUrl: String? = nil, updatedAt: String? = nil) {
|
|
self.branches = branches
|
|
self.cloneUrl = cloneUrl
|
|
self.createdAt = createdAt
|
|
self.defaultBranch = defaultBranch
|
|
self.description = description
|
|
self.head = head
|
|
self.id = id
|
|
self.name = name
|
|
self.org = org
|
|
self.project = project
|
|
self._public = _public
|
|
self.sizeBytes = sizeBytes
|
|
self.sshUrl = sshUrl
|
|
self.updatedAt = updatedAt
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case branches
|
|
case cloneUrl
|
|
case createdAt
|
|
case defaultBranch
|
|
case description
|
|
case head
|
|
case id
|
|
case name
|
|
case org
|
|
case project
|
|
case _public = "public"
|
|
case sizeBytes
|
|
case sshUrl
|
|
case updatedAt
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(branches, forKey: .branches)
|
|
try container.encodeIfPresent(cloneUrl, forKey: .cloneUrl)
|
|
try container.encodeIfPresent(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(defaultBranch, forKey: .defaultBranch)
|
|
try container.encodeIfPresent(description, forKey: .description)
|
|
try container.encodeIfPresent(head, forKey: .head)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(org, forKey: .org)
|
|
try container.encodeIfPresent(project, forKey: .project)
|
|
try container.encodeIfPresent(_public, forKey: ._public)
|
|
try container.encodeIfPresent(sizeBytes, forKey: .sizeBytes)
|
|
try container.encodeIfPresent(sshUrl, forKey: .sshUrl)
|
|
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension RepoView: Identifiable {}
|