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.7 KiB
Swift
51 lines
1.7 KiB
Swift
//
|
|
// FileList.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct FileList: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Drive is the drive that was listed. */
|
|
public var drive: String?
|
|
/** Files are the entries at this level, names RELATIVE to Folder. */
|
|
public var files: [FileItem]?
|
|
/** Folder is the sub-folder the listing was scoped to, cleaned. Empty for the drive's own root. */
|
|
public var folder: String?
|
|
/** Space is the space that was listed. */
|
|
public var space: String?
|
|
/** Total is how many entries came back. The listing is BOUNDED, so a drive with more files than the cap answers the cap and this says so — it is not a count of what the drive holds. */
|
|
public var total: Int64?
|
|
|
|
public init(drive: String? = nil, files: [FileItem]? = nil, folder: String? = nil, space: String? = nil, total: Int64? = nil) {
|
|
self.drive = drive
|
|
self.files = files
|
|
self.folder = folder
|
|
self.space = space
|
|
self.total = total
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case drive
|
|
case files
|
|
case folder
|
|
case space
|
|
case total
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(drive, forKey: .drive)
|
|
try container.encodeIfPresent(files, forKey: .files)
|
|
try container.encodeIfPresent(folder, forKey: .folder)
|
|
try container.encodeIfPresent(space, forKey: .space)
|
|
try container.encodeIfPresent(total, forKey: .total)
|
|
}
|
|
}
|
|
|