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.4 KiB
Swift
46 lines
1.4 KiB
Swift
//
|
||
// BucketWrite.swift
|
||
//
|
||
// Generated by openapi-generator
|
||
// https://openapi-generator.tech
|
||
//
|
||
|
||
import Foundation
|
||
|
||
public struct BucketWrite: Sendable, Codable, ParameterConvertible, Hashable {
|
||
|
||
/** Bucket is the bucket's name within the org, from the path: 1–64 of [A-Za-z0-9_], no dash. */
|
||
public var bucket: String?
|
||
/** History is how many revisions each key keeps, 1–64. 0 means 1. */
|
||
public var history: Int64?
|
||
/** MaxValue caps one value's size in bytes. 0 or less means the server's ceiling. */
|
||
public var maxValue: Int64?
|
||
/** TTL expires entries after this many SECONDS. 0 means no expiry. */
|
||
public var ttl: Int64?
|
||
|
||
public init(bucket: String? = nil, history: Int64? = nil, maxValue: Int64? = nil, ttl: Int64? = nil) {
|
||
self.bucket = bucket
|
||
self.history = history
|
||
self.maxValue = maxValue
|
||
self.ttl = ttl
|
||
}
|
||
|
||
public enum CodingKeys: String, CodingKey, CaseIterable {
|
||
case bucket
|
||
case history
|
||
case maxValue
|
||
case ttl
|
||
}
|
||
|
||
// 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(history, forKey: .history)
|
||
try container.encodeIfPresent(maxValue, forKey: .maxValue)
|
||
try container.encodeIfPresent(ttl, forKey: .ttl)
|
||
}
|
||
}
|
||
|