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.
56 lines
2.2 KiB
Swift
56 lines
2.2 KiB
Swift
//
|
|
// Query.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Query: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Character is a 0-based UTF-16 code-unit offset within Line, per the LSP specification — not a byte offset and not a rune index. */
|
|
public var character: Int64?
|
|
/** Line is 0-based, per the LSP specification. */
|
|
public var line: Int64?
|
|
/** Path is the repo-relative file, e.g. \"apps/lsp/lsp.go\". */
|
|
public var path: String?
|
|
/** Relation refines locate: definition, reference, type or implementation. Empty means definition. Every other op ignores it. */
|
|
public var relation: String?
|
|
/** Repo is the repository NAME within the caller's own org, e.g. \"cloud\". Not a URL and not an owner/name pair: the owner is the validated principal's org, so this names a repository the caller already owns. */
|
|
public var repo: String?
|
|
/** Rev is a branch, tag or commit sha. Empty means the default branch. It is resolved to a commit before anything else happens, so an answer is always about one immutable tree. */
|
|
public var rev: String?
|
|
|
|
public init(character: Int64? = nil, line: Int64? = nil, path: String? = nil, relation: String? = nil, repo: String? = nil, rev: String? = nil) {
|
|
self.character = character
|
|
self.line = line
|
|
self.path = path
|
|
self.relation = relation
|
|
self.repo = repo
|
|
self.rev = rev
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case character
|
|
case line
|
|
case path
|
|
case relation
|
|
case repo
|
|
case rev
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(character, forKey: .character)
|
|
try container.encodeIfPresent(line, forKey: .line)
|
|
try container.encodeIfPresent(path, forKey: .path)
|
|
try container.encodeIfPresent(relation, forKey: .relation)
|
|
try container.encodeIfPresent(repo, forKey: .repo)
|
|
try container.encodeIfPresent(rev, forKey: .rev)
|
|
}
|
|
}
|
|
|