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.
46 lines
1.5 KiB
Swift
46 lines
1.5 KiB
Swift
//
|
|
// Symbol.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Symbol: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Detail is the server's short elaboration, typically the signature. Absent when it offered none. */
|
|
public var detail: String?
|
|
/** Kind is the LSP SymbolKind number (5 class, 6 method, 12 function, 23 struct, …), passed through rather than translated to a word — these callers already speak LSP, and inventing a second vocabulary is how the two drift. */
|
|
public var kind: Int64?
|
|
/** Name is the declared identifier. */
|
|
public var name: String?
|
|
/** Range is the declaration's span in the file. */
|
|
public var range: ModelRange?
|
|
|
|
public init(detail: String? = nil, kind: Int64? = nil, name: String? = nil, range: ModelRange? = nil) {
|
|
self.detail = detail
|
|
self.kind = kind
|
|
self.name = name
|
|
self.range = range
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case detail
|
|
case kind
|
|
case name
|
|
case range
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(detail, forKey: .detail)
|
|
try container.encodeIfPresent(kind, forKey: .kind)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(range, forKey: .range)
|
|
}
|
|
}
|
|
|