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.
51 lines
1.6 KiB
Swift
51 lines
1.6 KiB
Swift
//
|
|
// Citation.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Citation: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** EndLine is its last line, inclusive. */
|
|
public var endLine: Int64?
|
|
/** File is the path inside the repo, relative to its root. */
|
|
public var file: String?
|
|
/** Line is the first line of the cited region, 1-based. */
|
|
public var line: Int64?
|
|
/** Repo is the repository the cited code lives in (\"owner/name\"), absent when the ask was already scoped to one. */
|
|
public var repo: String?
|
|
/** Symbol is the declaration the region belongs to, when it belongs to one. */
|
|
public var symbol: String?
|
|
|
|
public init(endLine: Int64? = nil, file: String? = nil, line: Int64? = nil, repo: String? = nil, symbol: String? = nil) {
|
|
self.endLine = endLine
|
|
self.file = file
|
|
self.line = line
|
|
self.repo = repo
|
|
self.symbol = symbol
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case endLine
|
|
case file
|
|
case line
|
|
case repo
|
|
case symbol
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(endLine, forKey: .endLine)
|
|
try container.encodeIfPresent(file, forKey: .file)
|
|
try container.encodeIfPresent(line, forKey: .line)
|
|
try container.encodeIfPresent(repo, forKey: .repo)
|
|
try container.encodeIfPresent(symbol, forKey: .symbol)
|
|
}
|
|
}
|
|
|