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.7 KiB
Swift
46 lines
1.7 KiB
Swift
//
|
|
// GraphNeighborsOut.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct GraphNeighborsOut: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Bound is the ceiling this walk was held to, the same for every caller, so Truncated can be read against a number rather than guessed at. */
|
|
public var bound: Int64?
|
|
/** Depth is the deepest hop count actually reached. It is at most the depth asked for, and smaller when the walk ran out of edges first. */
|
|
public var depth: Int64?
|
|
/** Entities is everything reached, the seeds included, ordered by the fewest hops that reach each one and then by key. */
|
|
public var entities: [String]?
|
|
/** Truncated says the bound stopped the walk. The bound is part of the answer rather than a silent short read. */
|
|
public var truncated: Bool?
|
|
|
|
public init(bound: Int64? = nil, depth: Int64? = nil, entities: [String]? = nil, truncated: Bool? = nil) {
|
|
self.bound = bound
|
|
self.depth = depth
|
|
self.entities = entities
|
|
self.truncated = truncated
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case bound
|
|
case depth
|
|
case entities
|
|
case truncated
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(bound, forKey: .bound)
|
|
try container.encodeIfPresent(depth, forKey: .depth)
|
|
try container.encodeIfPresent(entities, forKey: .entities)
|
|
try container.encodeIfPresent(truncated, forKey: .truncated)
|
|
}
|
|
}
|
|
|