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.5 KiB
Swift
46 lines
1.5 KiB
Swift
//
|
|
// ObjectList.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ObjectList: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Bucket is the bucket that was listed, friendly name. */
|
|
public var bucket: String?
|
|
/** Objects are the entries at this level, keys RELATIVE to Prefix. */
|
|
public var objects: [ObjectItem]?
|
|
/** Prefix is the sub-folder the listing was scoped to, cleaned. Empty for the bucket root. */
|
|
public var _prefix: String?
|
|
/** Total is how many entries came back. The listing is BOUNDED, so a bucket with more keys than the cap answers the cap and this says so — it is not a count of what the bucket holds. */
|
|
public var total: Int64?
|
|
|
|
public init(bucket: String? = nil, objects: [ObjectItem]? = nil, _prefix: String? = nil, total: Int64? = nil) {
|
|
self.bucket = bucket
|
|
self.objects = objects
|
|
self._prefix = _prefix
|
|
self.total = total
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case bucket
|
|
case objects
|
|
case _prefix = "prefix"
|
|
case total
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(bucket, forKey: .bucket)
|
|
try container.encodeIfPresent(objects, forKey: .objects)
|
|
try container.encodeIfPresent(_prefix, forKey: ._prefix)
|
|
try container.encodeIfPresent(total, forKey: .total)
|
|
}
|
|
}
|
|
|