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.3 KiB
Swift
46 lines
1.3 KiB
Swift
//
|
|
// IndexDocuments.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct IndexDocuments: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Limit is how many documents this page could hold. */
|
|
public var limit: Int64?
|
|
/** Offset is where this page starts. */
|
|
public var offset: Int64?
|
|
/** Results are the documents themselves, exactly as they were stored. */
|
|
public var results: [JSONValue]?
|
|
/** Total is how many documents the index holds altogether. */
|
|
public var total: Int64?
|
|
|
|
public init(limit: Int64? = nil, offset: Int64? = nil, results: [JSONValue]? = nil, total: Int64? = nil) {
|
|
self.limit = limit
|
|
self.offset = offset
|
|
self.results = results
|
|
self.total = total
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case limit
|
|
case offset
|
|
case results
|
|
case total
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(limit, forKey: .limit)
|
|
try container.encodeIfPresent(offset, forKey: .offset)
|
|
try container.encodeIfPresent(results, forKey: .results)
|
|
try container.encodeIfPresent(total, forKey: .total)
|
|
}
|
|
}
|
|
|