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.
71 lines
2.7 KiB
Swift
71 lines
2.7 KiB
Swift
//
|
|
// IndexResult.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct IndexResult: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Chunks is how many AST-boundary chunks the repo holds after this pass. */
|
|
public var chunks: Int64?
|
|
/** Files is how many files the repo holds after this pass. */
|
|
public var files: Int64?
|
|
/** Indexed is how many files were parsed and written on this pass. */
|
|
public var indexed: Int64?
|
|
/** Pruned is how many stored files were deleted because prune was set and they were absent from the request. */
|
|
public var pruned: Int64?
|
|
/** Repo is the repository that was indexed. */
|
|
public var repo: String?
|
|
/** Semantic reports whether the semantic tier was available for this pass. When false the index is lexical + symbolic only and hybrid search still works. */
|
|
public var semantic: Bool?
|
|
/** Skipped is how many files were unchanged by content hash and left alone. */
|
|
public var skipped: Int64?
|
|
/** Symbols is how many symbol definitions the repo holds after this pass. */
|
|
public var symbols: Int64?
|
|
/** Vectors is how many of those chunks carry an embedding. */
|
|
public var vectors: Int64?
|
|
|
|
public init(chunks: Int64? = nil, files: Int64? = nil, indexed: Int64? = nil, pruned: Int64? = nil, repo: String? = nil, semantic: Bool? = nil, skipped: Int64? = nil, symbols: Int64? = nil, vectors: Int64? = nil) {
|
|
self.chunks = chunks
|
|
self.files = files
|
|
self.indexed = indexed
|
|
self.pruned = pruned
|
|
self.repo = repo
|
|
self.semantic = semantic
|
|
self.skipped = skipped
|
|
self.symbols = symbols
|
|
self.vectors = vectors
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case chunks
|
|
case files
|
|
case indexed
|
|
case pruned
|
|
case repo
|
|
case semantic
|
|
case skipped
|
|
case symbols
|
|
case vectors
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(chunks, forKey: .chunks)
|
|
try container.encodeIfPresent(files, forKey: .files)
|
|
try container.encodeIfPresent(indexed, forKey: .indexed)
|
|
try container.encodeIfPresent(pruned, forKey: .pruned)
|
|
try container.encodeIfPresent(repo, forKey: .repo)
|
|
try container.encodeIfPresent(semantic, forKey: .semantic)
|
|
try container.encodeIfPresent(skipped, forKey: .skipped)
|
|
try container.encodeIfPresent(symbols, forKey: .symbols)
|
|
try container.encodeIfPresent(vectors, forKey: .vectors)
|
|
}
|
|
}
|
|
|