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.
66 lines
2.9 KiB
Swift
66 lines
2.9 KiB
Swift
//
|
|
// GithubSearchHit.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct GithubSearchHit: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** CloneURL is the repository's https git remote. */
|
|
public var cloneUrl: String?
|
|
/** DefaultBranch is the branch a clone checks out. */
|
|
public var defaultBranch: String?
|
|
/** Description is the blurb the repository's owner wrote. Empty when it has none. */
|
|
public var description: String?
|
|
/** FullName is the repository's \"owner/repo\" on GitHub. Finding it here does NOT make it forkable: githubFork takes a repo the org's installation was granted, and a hit from the public index usually is not one. */
|
|
public var fullName: String?
|
|
/** HTMLURL is the repository's page on github.com. */
|
|
public var htmlUrl: String?
|
|
/** Language is the primary language GitHub detected from the file mix (\"Go\", \"TypeScript\"). Empty when GitHub attributes none. */
|
|
public var language: String?
|
|
/** Private is GitHub's visibility flag, passed through. This op reads the public index — the org's token only charges the rate limit to the installation — so it is false for everything a search can reach. */
|
|
public var _private: Bool?
|
|
/** Stars is GitHub's stargazers_count as the SEARCH INDEX held it when the query ran — a snapshot, not a live count off the repository. */
|
|
public var stars: Int64?
|
|
|
|
public init(cloneUrl: String? = nil, defaultBranch: String? = nil, description: String? = nil, fullName: String? = nil, htmlUrl: String? = nil, language: String? = nil, _private: Bool? = nil, stars: Int64? = nil) {
|
|
self.cloneUrl = cloneUrl
|
|
self.defaultBranch = defaultBranch
|
|
self.description = description
|
|
self.fullName = fullName
|
|
self.htmlUrl = htmlUrl
|
|
self.language = language
|
|
self._private = _private
|
|
self.stars = stars
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case cloneUrl = "clone_url"
|
|
case defaultBranch = "default_branch"
|
|
case description
|
|
case fullName = "full_name"
|
|
case htmlUrl = "html_url"
|
|
case language
|
|
case _private = "private"
|
|
case stars
|
|
}
|
|
|
|
// 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(description, forKey: .description)
|
|
try container.encodeIfPresent(fullName, forKey: .fullName)
|
|
try container.encodeIfPresent(htmlUrl, forKey: .htmlUrl)
|
|
try container.encodeIfPresent(language, forKey: .language)
|
|
try container.encodeIfPresent(_private, forKey: ._private)
|
|
try container.encodeIfPresent(stars, forKey: .stars)
|
|
}
|
|
}
|
|
|