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.
41 lines
1.4 KiB
Swift
41 lines
1.4 KiB
Swift
//
|
|
// TreeEntry.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct TreeEntry: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Lang is the language the indexer parsed the file as (\"go\", \"python\", …), or empty when it recognised none — in which case Symbols is 0 because nothing was extracted, not because the file declares nothing. */
|
|
public var lang: String?
|
|
/** Path is the file, relative to the repo root. The list is ordered by it, so a reader can see module layout without sorting. */
|
|
public var path: String?
|
|
/** Symbols is how many top-level declarations the file defines. A file with none is still listed: the file set is the authority here and the counts decorate it. */
|
|
public var symbols: Int64?
|
|
|
|
public init(lang: String? = nil, path: String? = nil, symbols: Int64? = nil) {
|
|
self.lang = lang
|
|
self.path = path
|
|
self.symbols = symbols
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case lang
|
|
case path
|
|
case symbols
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(lang, forKey: .lang)
|
|
try container.encodeIfPresent(path, forKey: .path)
|
|
try container.encodeIfPresent(symbols, forKey: .symbols)
|
|
}
|
|
}
|
|
|